diff --git a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSAudio/README.md b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSAudio/README.md index 1c5e051e9ce80b7e049a9af8d08fb1aa7617da1f..3a670022bda3be394b3d6c8441055b2c6bc2b0ce 100644 --- a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSAudio/README.md +++ b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSAudio/README.md @@ -61,6 +61,6 @@ entry/src/ohosTest/ets/ git init git config core.sparsecheckout true echo code/DocsSample/Media/AVPlayer/AVPlayerArkTSAudio/ > .git/info/sparse-checkout -git remote add origin OpenHarmony/applications_app_samples +git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master ``` \ No newline at end of file diff --git a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSStreamingMedia/README.md b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSStreamingMedia/README.md index 01ebff0b997a8203d689f0e2a8c0f8c005eac5cb..245beb76275a99964c96005115422943fd9a82b3 100644 --- a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSStreamingMedia/README.md +++ b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSStreamingMedia/README.md @@ -61,6 +61,6 @@ entry/src/ohosTest/ets/ git init git config core.sparsecheckout true echo code/DocsSample/Media/AVPlayer/AVPlayerArkTSStreamingMedia/ > .git/info/sparse-checkout -git remote add origin OpenHarmony/applications_app_samples +git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master ``` \ No newline at end of file diff --git a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSSubtitle/README.md b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSSubtitle/README.md index db1b864c0c79da63b5ae2d1672d0a799569013d3..4a4b59a652e3048b7788a93a2a61fc1898c9dbae 100644 --- a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSSubtitle/README.md +++ b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSSubtitle/README.md @@ -62,6 +62,6 @@ entry/src/ohosTest/ets/ git init git config core.sparsecheckout true echo code/DocsSample/Media/AVPlayer/AVPlayerArkTSSubtitle/ > .git/info/sparse-checkout -git remote add origin OpenHarmony/applications_app_samples +git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master ``` \ No newline at end of file diff --git a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSURL/README.md b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSURL/README.md index 26cc9856164dc88aea0489b637b3b7400605c564..115d7b5ee0b7af63485fe2745728ce121065ba29 100644 --- a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSURL/README.md +++ b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSURL/README.md @@ -63,6 +63,6 @@ ohos.permission.GET_WIFI_INFO git init git config core.sparsecheckout true echo code/DocsSample/Media/AVPlayer/AVPlayerArkTSURL/ > .git/info/sparse-checkout -git remote add origin OpenHarmony/applications_app_samples +git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master ``` \ No newline at end of file diff --git a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSURL/entry/src/main/ets/pages/Index.ets b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSURL/entry/src/main/ets/pages/Index.ets index 5f31d4bea56f27f4904f761238f6d2db48fc9f16..be70853ccbc5647adff71bb0b5ac48366f391811 100644 --- a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSURL/entry/src/main/ets/pages/Index.ets +++ b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSURL/entry/src/main/ets/pages/Index.ets @@ -56,7 +56,7 @@ struct Index { @State title: Resource = $r('app.string.EntryAbility_label'); @State fileName: string = 'test_01.mp3'; - @State m3u8fileName: string = 'test.m3u8'; + @State m3u8FileName: string = 'test.m3u8'; @State isSwiping: boolean = false; // 用户滑动过程中 @State isPaused: boolean = true; // 暂停播放 @State XComponentFlag: boolean = false; @@ -148,7 +148,7 @@ struct Index { // 情况四:通过本地Raw文件中的m3u8文件播放在线流媒体资源 /* // 通过本地m3u8文件名,获取文件描述符 - let fileDescriptor = await this.context.resourceManager.getRawFd(this.m3u8fileName); + let fileDescriptor = await this.context.resourceManager.getRawFd(this.m3u8FileName); // 用文件描述符构造本地m3u8的URL let fdUrl : string = "fd://" + fileDescriptor.fd + "?offset=" + fileDescriptor.offset + "&size=" + fileDescriptor.length; @@ -169,7 +169,7 @@ struct Index { // 情况五:通过应用沙箱中的m3u8文件播放在线流媒体资源 /* - let filePath = `/data/storage/el1/bundle/${this.m3u8fileName}`; + let filePath = `${this.context.filesDir}/${this.m3u8FileName}`; // 通过fs.openSync获取文件句柄 let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY); let fd : string = file.fd.toString(); @@ -196,8 +196,7 @@ struct Index { // 情况一:应用沙箱文件播放 let fdPath = 'fd://'; // 通过UIAbilityContext获取沙箱地址filesDir,以Stage模型为例 - let pathDir = this.context.filesDir; - let path = `/data/storage/el1/bundle/${this.fileName}`; + let path = `${this.context.filesDir}/${this.fileName}`; // 打开相应的资源文件地址获取fd,并为url赋值触发initialized状态机上报 let file = await fs.open(path); fdPath = fdPath + '' + file.fd; diff --git a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSVideo/README.md b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSVideo/README.md index 104c91137e1bf352c094419655734309cb685898..0c1b575c85e4986002e352eb6384ff77b0815c48 100644 --- a/code/DocsSample/Media/AVPlayer/AVPlayerArkTSVideo/README.md +++ b/code/DocsSample/Media/AVPlayer/AVPlayerArkTSVideo/README.md @@ -61,6 +61,6 @@ entry/src/ohosTest/ets/ git init git config core.sparsecheckout true echo code/DocsSample/Media/AVPlayer/AVPlayerArkTSVideo/ > .git/info/sparse-checkout -git remote add origin OpenHarmony/applications_app_samples +git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master ``` \ No newline at end of file diff --git a/code/DocsSample/Media/AVPlayer/AVPlayerNDKAudio/README.md b/code/DocsSample/Media/AVPlayer/AVPlayerNDKAudio/README.md index 84f73ba8a86c7c2e0e828c6d98e86c1e08d585f7..6bb140a4489e53df032cdda961513e07fd9d706d 100644 --- a/code/DocsSample/Media/AVPlayer/AVPlayerNDKAudio/README.md +++ b/code/DocsSample/Media/AVPlayer/AVPlayerNDKAudio/README.md @@ -68,6 +68,6 @@ entry/src/ohosTest/ets/ git init git config core.sparsecheckout true echo code/DocsSample/Media/AVPlayer/AVPlayerNDKAudio/ > .git/info/sparse-checkout -git remote add origin OpenHarmony/applications_app_samples +git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master ``` \ No newline at end of file diff --git a/code/DocsSample/Media/AVPlayer/AVPlayerNDKVideo/README.md b/code/DocsSample/Media/AVPlayer/AVPlayerNDKVideo/README.md index e642a1aad7f5e3bcdba72d557a33b3e9178d51a5..4fdf17d417ca4e2cec4310d1035f321cfd531472 100644 --- a/code/DocsSample/Media/AVPlayer/AVPlayerNDKVideo/README.md +++ b/code/DocsSample/Media/AVPlayer/AVPlayerNDKVideo/README.md @@ -68,6 +68,6 @@ entry/src/ohosTest/ets/ git init git config core.sparsecheckout true echo code/DocsSample/Media/AVPlayer/AVPlayerNDKVideo/ > .git/info/sparse-checkout -git remote add origin OpenHarmony/applications_app_samples +git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master ``` \ No newline at end of file