簡體   English   中英

下載手機視頻並使用Flex Mobile項目播放

[英]Download video in mobile and play it using flex mobile project

我正在將視頻從Internet下載到移動設備上,並想播放它。 我無法找到該視頻的正確路徑。 我不知道視頻會保存在desktopDirectory或documentsDirectory中。

我有一個包含每個視頻名稱的數組。 知道如何獲取路徑並在videoDisplay中播放嗎?

對於移動設備,不建議使用VideoDisplay。 還有其他播放器可以在移動設備上運行視頻嗎?

我的代碼是

fr = new FileReference(); 
request = new URLRequest(file_url);
fr.download(request);
trace("Downloading "+request);

fr.addEventListener(Event.OPEN,start);                  fr.addEventListener(ProgressEvent.PROGRESS,updateProgress);
fr.addEventListener(Event.COMPLETE,complete);

private function complete(event:Event):void {
      progress_indicator.visible = false;
      progress_label.text =  "100% completed";
    trace("File: "+fr.name);
    var appmanager:ApplicationManager = ApplicationManager.SharedApplicationManager();
    appmanager.DownloadedVideos[appmanager.DownloadedVideos.length] = fr.name;
}

首先,我希望您使用Flex不僅僅是播放視頻,否則效率會很低。 其次,由於硬件加速,您應該使用StageVideo在移動設備上播放視頻。 您應該查看Adobe的一些教程,了解如何在設備上使用它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM