Reputation: 1
I need to play a mp4 video and the source of video is on my cloud server. I try to play using video tag <video></video>
it’s work correctly the video is playing. But when i try to using AVPlay API it’s throw the error PLAYER_ERROR_CONNECTION_FAILED when calling to prepare. This is my code
webapis.avplay.open("https://preskripsi.com/assets/net.mp4");
webapis.avplay.setDisplayRect(0, 0, 1920, 1080);
webapis.avplay.setDisplayMethod(
"PLAYER_DISPLAY_MODE_AUTO_ASPECT_RATIO"
);
webapis.avplay.setListener(listener);
webapis.avplay.prepareAsync(function () {
webapis.avplay.play();
});
i’ve been put this on config.xml but it’s still not working
<access origin="*" subdomains="true"></access>
<tizen:privilege name="http://tizen.org/privilege/internet"/>
<tizen:privilege name="http://tizen.org/privilege/tv.window"/>
and i try to put this on config.xml
<tizen:privilege name="http://developer.samsung.com/privilege/avplay" />
but still not working
please help me, thanks.
Upvotes: 0
Views: 540
Reputation: 51
i think you need below line in the config.xml
<feature name="http://tizen.org/feature/screen.size.normal.1080.1920" />
i have full working code in https://github.com/zamroni111/samsung_avplay_widevine
Upvotes: 0
Reputation: 1
Sample code looks fine. I didn't meet the problem as you, but basing on my experience it looks environment issue,may be network. you can also check your content with Sample AVPLAY wgt: https://github.com/SamsungDForum/PlayerAVPlay/blob/master/PlayerAVPlay/
Upvotes: 0