SamsungDForum / WebAssemblyDemos

Sample WebAssembly applications for Tizen TVs
15 stars 4 forks source link

wasm_player_sample : Example of using an external source (URL) #4

Open ELOUFIR opened 2 years ago

ELOUFIR commented 2 years ago

Hi I'm new to Webassembly and C++ and want to try playing an external video using a URL: https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_30MB.mp4 The example uses hardcoded data. Could you please help me to change it in order to load the data from the URL? Thanks

abujalski commented 2 years ago

Hi, It is not simple to change it this way.

In order to do so you need to:

  1. Add library responsible for downloading data using HTTP protocol (cURL is one of such libraries) and implement download logic using that library
  2. Add library responsible for demuxing downloaded content, so it will be possible to feed it EMSS (FFmpeg is such library).

We haven't include such logic in our example because this logic is application specific and will complicate demo in such way that it will be hard to see how to use EMSS API.

You can find more information regarding EMSS here: https://developer.samsung.com/smarttv/develop/extension-libraries/webassembly/tizen-wasm-player/overview.html