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
Post a Comment