xcode - play audio and video files in Cordova app that reside in iOS Documents directory -


i have cordova application use able link mp3 , mp4 files relatively using src so:

../../documents/videos/video.mp4 

i updated cordova application latest version , these relative urls don't work i've been expermenting other solutions.

it looks if use cordova.file.documentsdirectory (ios only) variable can link them way when save references these files in database guid of application changes , url no longer valid when app rebuilt , relaunched.

i tried using cdvfile://localhost/persistent/ seems work images , not video or audio files using html5 audio , video tags playback.

ultimately save files variable gets replaced @ run-time not preferred "solution." [documentsfolder]/videos/video.mp4

how can link persistent file location , have work images, audio files, , video files?

i love use cdvfile url have work mp3 , mp4 files.

thank you.

you should able access resource [[[nsbundle mainbundle]resourcepath]stringbyappendingpathcomponent:@"www/[your path]"]


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -