User Tools

Site Tools


en:tvipjsapi:5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
en:tvipjsapi:5 [2019/11/12 13:54]
Alexander [void playUrl (String url, String mode);]
en:tvipjsapi:5 [2020/10/16 13:35]
Alexander [void playUrl (String url, String mode);]
Line 73: Line 73:
  
 Returns API version. Returns API version.
 +\\ \\
 +
 +
 +====String getSoftwareVersion();​====
 +
 +Returns software version of STB
 +
 \\ \\ \\ \\
  
Line 428: Line 435:
  
 ====void playUrl (String url, String mode);==== ====void playUrl (String url, String mode);====
 +====void playUrl (String url, Object options);​====
  
 Starts playback defined URL(local path also welcome). Starts playback defined URL(local path also welcome).
Line 445: Line 453:
 playUrl ("​http://​domain.tv/​hls/​playlist.m3u8",​ ""​);​ // Start play HLS-video; playUrl ("​http://​domain.tv/​hls/​playlist.m3u8",​ ""​);​ // Start play HLS-video;
 </​code>​ </​code>​
 +
 +Advanced options could be set up with //options// object:
 +<​code>​
 +playUrl("​udp://​239.1.1.1",​
 +{
 +  "​mode"​ : "​live",​
 +  "​audio_index"​ : 1,
 +  "​subtitle_index":​ 3
 +}
 +);
 +</​code>​
 +Possible options:\\
 +//mode// - same as above.\\
 +//​position//​ - initial playback position in mseconds.\\
 +//​audio_index//​ - initial audio track index.\\
 +//​audio_pid//​ - initial audio PID (in case of MPEGTS).\\
 +//​subtitle_index//​ - initial subtitle track index.\\
 +//​subtitle_pid//​ - initial subtitle PID (in case of MPEGTS).\\
 +//​parse_epg//​ - enabled EIT MPEGTS parser.\\
 +
  
 \\ \\  \\ \\ 
Line 482: Line 510:
 \\ \\ \\ \\
  
-====void ​attachExternelSubtitle(String url, String encoding)====+====void ​attachExternalSubtitle(String url, String encoding)====
  
 Add subtitles from an external file (from //url//) to currently played media. This method should be called after playUrl. Optional parameter //​encoding//​ sets up character encoding of subtitle file. Add subtitles from an external file (from //url//) to currently played media. This method should be called after playUrl. Optional parameter //​encoding//​ sets up character encoding of subtitle file.
en/tvipjsapi/5.txt · Last modified: 2020/12/02 11:44 by Alexander