Tizen AVPlay Player Can’t Play MP4 PLAYER_ERROR_CONNECTION_FAILED

72 Views Asked by At

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.

1

There are 1 best solutions below

1
Renu On

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/