3146 lines
98 KiB
HTML
Executable File
3146 lines
98 KiB
HTML
Executable File
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="generator" content="JsDoc Toolkit" />
|
|
<title>hcap.Media | JsDoc Reference</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
|
<meta name="mobileoptimized" content="0" />
|
|
|
|
<link rel="stylesheet" href="../css/all.css" media="all" />
|
|
<link rel="stylesheet" href="../css/handheld.css" media="only screen and (max-width: 660px)" />
|
|
<link rel="stylesheet" href="../css/handheld.css" media="handheld" />
|
|
<link rel="stylesheet" href="../css/screen.css" media="screen and (min-width: 661px)" />
|
|
|
|
<link rel="stylesheet" href="../javascript/highlighter/dessert.css" />
|
|
|
|
<script src="../javascript/all.js"></script>
|
|
<!--[if lt IE 9]>
|
|
<script src="../javascript/html5.js"></script>
|
|
<![endif]-->
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="index">
|
|
<div class="menu">
|
|
<div class="indexLinks">
|
|
<a href="../index.html">Classes</a>
|
|
<a href="../files.html">Files</a>
|
|
</div>
|
|
<table width=100% class=confidential><tr><td><b>LGE Confidential</b></td></tr></table>
|
|
<h2 class="heading1">Library</h2>
|
|
<table>
|
|
<tr>
|
|
<td align=left class=confidential><a href="../../js/hcap.js">·hcap.js (1.24.6.5901)</li></a></td>
|
|
</tr>
|
|
</table>
|
|
<h2 class="heading1">Classes</h2>
|
|
|
|
<input type="text" name="classFilter" class="classFilter" id="ClassFilter" placeholder="Filter"></input>
|
|
|
|
<nav>
|
|
<ul class="classList" id="ClassList">
|
|
|
|
<li><a href="../symbols/_global_.html">_global_</a></li>
|
|
|
|
<li><a href="../symbols/hcap.html">hcap</a></li>
|
|
|
|
<li><a href="../symbols/hcap.application.html">hcap<span class='break'> </span>.<span class='break'> </span>application</a></li>
|
|
|
|
<li><a href="../symbols/hcap.beacon.html">hcap<span class='break'> </span>.<span class='break'> </span>beacon</a></li>
|
|
|
|
<li><a href="../symbols/hcap.bluetooth.html">hcap<span class='break'> </span>.<span class='break'> </span>bluetooth</a></li>
|
|
|
|
<li><a href="../symbols/hcap.bluetooth.audio.html">hcap<span class='break'> </span>.<span class='break'> </span>bluetooth<span class='break'> </span>.<span class='break'> </span>audio</a></li>
|
|
|
|
<li><a href="../symbols/hcap.camera.html">hcap<span class='break'> </span>.<span class='break'> </span>camera</a></li>
|
|
|
|
<li><a href="../symbols/hcap.carousel.html">hcap<span class='break'> </span>.<span class='break'> </span>carousel</a></li>
|
|
|
|
<li><a href="../symbols/hcap.channel.html">hcap<span class='break'> </span>.<span class='break'> </span>channel</a></li>
|
|
|
|
<li><a href="../symbols/hcap.channel.AudioStreamType.html">hcap<span class='break'> </span>.<span class='break'> </span>channel<span class='break'> </span>.<span class='break'> </span>AudioStreamType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.channel.ChannelStatus.html">hcap<span class='break'> </span>.<span class='break'> </span>channel<span class='break'> </span>.<span class='break'> </span>ChannelStatus</a></li>
|
|
|
|
<li><a href="../symbols/hcap.channel.ChannelType.html">hcap<span class='break'> </span>.<span class='break'> </span>channel<span class='break'> </span>.<span class='break'> </span>ChannelType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.channel.InbandDataServiceType.html">hcap<span class='break'> </span>.<span class='break'> </span>channel<span class='break'> </span>.<span class='break'> </span>InbandDataServiceType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.channel.IpBroadcastType.html">hcap<span class='break'> </span>.<span class='break'> </span>channel<span class='break'> </span>.<span class='break'> </span>IpBroadcastType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.channel.Polarization.html">hcap<span class='break'> </span>.<span class='break'> </span>channel<span class='break'> </span>.<span class='break'> </span>Polarization</a></li>
|
|
|
|
<li><a href="../symbols/hcap.channel.RfBroadcastType.html">hcap<span class='break'> </span>.<span class='break'> </span>channel<span class='break'> </span>.<span class='break'> </span>RfBroadcastType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.channel.VideoStreamType.html">hcap<span class='break'> </span>.<span class='break'> </span>channel<span class='break'> </span>.<span class='break'> </span>VideoStreamType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.checkout.html">hcap<span class='break'> </span>.<span class='break'> </span>checkout</a></li>
|
|
|
|
<li><a href="../symbols/hcap.externalinput.html">hcap<span class='break'> </span>.<span class='break'> </span>externalinput</a></li>
|
|
|
|
<li><a href="../symbols/hcap.externalinput.ExternalInputType.html">hcap<span class='break'> </span>.<span class='break'> </span>externalinput<span class='break'> </span>.<span class='break'> </span>ExternalInputType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.file.html">hcap<span class='break'> </span>.<span class='break'> </span>file</a></li>
|
|
|
|
<li><a href="../symbols/hcap.iot.html">hcap<span class='break'> </span>.<span class='break'> </span>iot</a></li>
|
|
|
|
<li><a href="../symbols/hcap.key.html">hcap<span class='break'> </span>.<span class='break'> </span>key</a></li>
|
|
|
|
<li><a href="../symbols/hcap.key.Code.html">hcap<span class='break'> </span>.<span class='break'> </span>key<span class='break'> </span>.<span class='break'> </span>Code</a></li>
|
|
|
|
<li><a href="../symbols/hcap.Media.html">hcap<span class='break'> </span>.<span class='break'> </span>Media</a></li>
|
|
|
|
<li><a href="../symbols/hcap.Media.SubtitleType.html">hcap<span class='break'> </span>.<span class='break'> </span>Media<span class='break'> </span>.<span class='break'> </span>SubtitleType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.mode.html">hcap<span class='break'> </span>.<span class='break'> </span>mode</a></li>
|
|
|
|
<li><a href="../symbols/hcap.mouse.html">hcap<span class='break'> </span>.<span class='break'> </span>mouse</a></li>
|
|
|
|
<li><a href="../symbols/hcap.mpi.html">hcap<span class='break'> </span>.<span class='break'> </span>mpi</a></li>
|
|
|
|
<li><a href="../symbols/hcap.network.html">hcap<span class='break'> </span>.<span class='break'> </span>network</a></li>
|
|
|
|
<li><a href="../symbols/hcap.network.DhcpState.html">hcap<span class='break'> </span>.<span class='break'> </span>network<span class='break'> </span>.<span class='break'> </span>DhcpState</a></li>
|
|
|
|
<li><a href="../symbols/hcap.network.NetworkEventType.html">hcap<span class='break'> </span>.<span class='break'> </span>network<span class='break'> </span>.<span class='break'> </span>NetworkEventType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.network.NetworkMode.html">hcap<span class='break'> </span>.<span class='break'> </span>network<span class='break'> </span>.<span class='break'> </span>NetworkMode</a></li>
|
|
|
|
<li><a href="../symbols/hcap.network.WifiSecurityType.html">hcap<span class='break'> </span>.<span class='break'> </span>network<span class='break'> </span>.<span class='break'> </span>WifiSecurityType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.network.WirelessMode.html">hcap<span class='break'> </span>.<span class='break'> </span>network<span class='break'> </span>.<span class='break'> </span>WirelessMode</a></li>
|
|
|
|
<li><a href="../symbols/hcap.power.html">hcap<span class='break'> </span>.<span class='break'> </span>power</a></li>
|
|
|
|
<li><a href="../symbols/hcap.power.PowerMode.html">hcap<span class='break'> </span>.<span class='break'> </span>power<span class='break'> </span>.<span class='break'> </span>PowerMode</a></li>
|
|
|
|
<li><a href="../symbols/hcap.preloadedApplication.html">hcap<span class='break'> </span>.<span class='break'> </span>preloadedApplication</a></li>
|
|
|
|
<li><a href="../symbols/hcap.property.html">hcap<span class='break'> </span>.<span class='break'> </span>property</a></li>
|
|
|
|
<li><a href="../symbols/hcap.property.InstallerMenuItem.html">hcap<span class='break'> </span>.<span class='break'> </span>property<span class='break'> </span>.<span class='break'> </span>InstallerMenuItem</a></li>
|
|
|
|
<li><a href="../symbols/hcap.property.PictureMode.html">hcap<span class='break'> </span>.<span class='break'> </span>property<span class='break'> </span>.<span class='break'> </span>PictureMode</a></li>
|
|
|
|
<li><a href="../symbols/hcap.property.PicturePropertyKey.html">hcap<span class='break'> </span>.<span class='break'> </span>property<span class='break'> </span>.<span class='break'> </span>PicturePropertyKey</a></li>
|
|
|
|
<li><a href="../symbols/hcap.rms.html">hcap<span class='break'> </span>.<span class='break'> </span>rms</a></li>
|
|
|
|
<li><a href="../symbols/hcap.rs232c.html">hcap<span class='break'> </span>.<span class='break'> </span>rs232c</a></li>
|
|
|
|
<li><a href="../symbols/hcap.rs232c.BaudRate.html">hcap<span class='break'> </span>.<span class='break'> </span>rs232c<span class='break'> </span>.<span class='break'> </span>BaudRate</a></li>
|
|
|
|
<li><a href="../symbols/hcap.rs232c.DataBit.html">hcap<span class='break'> </span>.<span class='break'> </span>rs232c<span class='break'> </span>.<span class='break'> </span>DataBit</a></li>
|
|
|
|
<li><a href="../symbols/hcap.rs232c.FlowControl.html">hcap<span class='break'> </span>.<span class='break'> </span>rs232c<span class='break'> </span>.<span class='break'> </span>FlowControl</a></li>
|
|
|
|
<li><a href="../symbols/hcap.rs232c.Parity.html">hcap<span class='break'> </span>.<span class='break'> </span>rs232c<span class='break'> </span>.<span class='break'> </span>Parity</a></li>
|
|
|
|
<li><a href="../symbols/hcap.rs232c.StopBit.html">hcap<span class='break'> </span>.<span class='break'> </span>rs232c<span class='break'> </span>.<span class='break'> </span>StopBit</a></li>
|
|
|
|
<li><a href="../symbols/hcap.security.html">hcap<span class='break'> </span>.<span class='break'> </span>security</a></li>
|
|
|
|
<li><a href="../symbols/hcap.socket.html">hcap<span class='break'> </span>.<span class='break'> </span>socket</a></li>
|
|
|
|
<li><a href="../symbols/hcap.speech.html">hcap<span class='break'> </span>.<span class='break'> </span>speech</a></li>
|
|
|
|
<li><a href="../symbols/hcap.speech.HostType.html">hcap<span class='break'> </span>.<span class='break'> </span>speech<span class='break'> </span>.<span class='break'> </span>HostType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.system.html">hcap<span class='break'> </span>.<span class='break'> </span>system</a></li>
|
|
|
|
<li><a href="../symbols/hcap.system.SoundOutputType.html">hcap<span class='break'> </span>.<span class='break'> </span>system<span class='break'> </span>.<span class='break'> </span>SoundOutputType</a></li>
|
|
|
|
<li><a href="../symbols/hcap.time.html">hcap<span class='break'> </span>.<span class='break'> </span>time</a></li>
|
|
|
|
<li><a href="../symbols/hcap.video.html">hcap<span class='break'> </span>.<span class='break'> </span>video</a></li>
|
|
|
|
<li><a href="../symbols/hcap.volume.html">hcap<span class='break'> </span>.<span class='break'> </span>volume</a></li>
|
|
|
|
<li><a href="../symbols/hcap.webrtc.html">hcap<span class='break'> </span>.<span class='break'> </span>webrtc</a></li>
|
|
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
<div class="fineprint" style="clear:both">
|
|
<footer>
|
|
|
|
Documentation generator: <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0<br />
|
|
Template: <a href="http://www.thebrightlines.com/2010/05/06/new-template-for-jsdoctoolkit-codeview/" target="_blank">Codeview</a> 1.2<br />
|
|
Generated on:
|
|
<time datetime='2021-8-13' pubdate>2021-8-13 18:29</time>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="index indexStatic"></div>
|
|
|
|
<div class="content">
|
|
<div class="innerContent">
|
|
<article>
|
|
<header>
|
|
<h1 class="classTitle">
|
|
|
|
Class <span>hcap.Media</span>
|
|
</h1>
|
|
|
|
<div class="intro">
|
|
<p class="description summary">
|
|
|
|
</p>
|
|
|
|
|
|
<ul class="summary">
|
|
|
|
|
|
|
|
<li>Defined in: <a href="../symbols/src/js_hcap-1.24.6.5901.js.html">hcap-1.24.6.5901.js</a></li>
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
</header>
|
|
|
|
|
|
<section>
|
|
<div class="props">
|
|
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class hcap.Media.">
|
|
<caption class="sectionTitle">Class Summary</caption>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Constructor Attributes</th>
|
|
<th scope="col">Constructor Name and Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription" >
|
|
<div class="fixedFont">
|
|
<b><a href="../symbols/hcap.Media.html#constructor">hcap.Media</a></b>()
|
|
</div>
|
|
<div class="description">Interface for displaying and controlling the playback of media on the TV.</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
<!--
|
|
#### METHODS SUMMARY
|
|
-->
|
|
|
|
<section>
|
|
|
|
|
|
<div class="props">
|
|
<h2 class="sectionTitle">Method Summary</h2>
|
|
|
|
|
|
<nav>
|
|
<table class="summaryTable" id="MethodsList" cellspacing="0" summary="A summary of the methods documented in the class hcap.Media.">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Method Attributes</th>
|
|
<th scope="col">Method Name and Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr
|
|
class='item0'
|
|
>
|
|
<td class="attributes"><static> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont">hcap.Media.<b><a href="../symbols/hcap.Media.html#.createMedia">createMedia</a></b>(param)
|
|
</div>
|
|
<div class="description">Create Media object.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item1'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#destroy">destroy</a></b>(param)
|
|
</div>
|
|
<div class="description">Destroy the media playback.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item2'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#getAudioLanguage">getAudioLanguage</a></b>(param)
|
|
</div>
|
|
<div class="description">Gets the list of supported audio languages and the index of list in the current media.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item3'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#getInformation">getInformation</a></b>(param)
|
|
</div>
|
|
<div class="description">Gets information of media.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item4'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#getPlayPosition">getPlayPosition</a></b>(param)
|
|
</div>
|
|
<div class="description">Gets the position (in milliseconds) in the media that the player is currently at.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item5'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#getPlaySpeed">getPlaySpeed</a></b>(param)
|
|
</div>
|
|
<div class="description">[RTSP Only] Gets the speed (rate) of the current media.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item6'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#getState">getState</a></b>(param)
|
|
</div>
|
|
<div class="description">Gets player status.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item7'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#getSubtitle">getSubtitle</a></b>(param)
|
|
</div>
|
|
<div class="description">Gets the subtitle type and track number and ISO639-1 launguage code if available.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item8'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#getSubtitleOn">getSubtitleOn</a></b>(param)
|
|
</div>
|
|
<div class="description">Gets the subtitle status of the current media.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item9'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#pause">pause</a></b>(param)
|
|
</div>
|
|
<div class="description">Pause the media playback.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item10'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#play">play</a></b>(param)
|
|
</div>
|
|
<div class="description">Starts playing a media file or stream.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item11'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#resume">resume</a></b>(param)
|
|
</div>
|
|
<div class="description">Resume the media playback.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item12'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#setAudioLanguage">setAudioLanguage</a></b>(param)
|
|
</div>
|
|
<div class="description">Sets the audio language of the current media.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item13'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#setPlayPosition">setPlayPosition</a></b>(param)
|
|
</div>
|
|
<div class="description">Sets the position of the player at which to continue playing the media at.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item14'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#setPlaySpeed">setPlaySpeed</a></b>(param)
|
|
</div>
|
|
<div class="description">[RTSP Only] Sets the speed (rate) of the current media.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item15'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#setSubtitle">setSubtitle</a></b>(param)
|
|
</div>
|
|
<div class="description">Sets the subtitle type and track number</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item16'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#setSubtitleOn">setSubtitleOn</a></b>(param)
|
|
</div>
|
|
<div class="description">Sets the subtitle of the current media on or off.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item17'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#setSubtitleUrl">setSubtitleUrl</a></b>(param)
|
|
</div>
|
|
<div class="description">Sets the subtitle url of the current media.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item18'
|
|
>
|
|
<td class="attributes"><static> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont">hcap.Media.<b><a href="../symbols/hcap.Media.html#.shutDown">shutDown</a></b>(param)
|
|
</div>
|
|
<div class="description">Shuts down media channel.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item19'
|
|
>
|
|
<td class="attributes"><static> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont">hcap.Media.<b><a href="../symbols/hcap.Media.html#.startUp">startUp</a></b>(param)
|
|
</div>
|
|
<div class="description">Starts up media channel which is one of input source on TV.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr
|
|
class='item20'
|
|
>
|
|
<td class="attributes"> </td>
|
|
<td class="nameDescription">
|
|
<div class="fixedFont"><b><a href="../symbols/hcap.Media.html#stop">stop</a></b>(param)
|
|
</div>
|
|
<div class="description">Stops the media playback.</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</nav>
|
|
|
|
|
|
|
|
</div>
|
|
</section>
|
|
|
|
|
|
<!--
|
|
#### EVENTS SUMMARY
|
|
-->
|
|
|
|
<!--
|
|
#### CONSTRUCTOR DETAILS
|
|
-->
|
|
|
|
<section>
|
|
<div class="details props">
|
|
<div class="innerProps">
|
|
<h2 class="sectionTitle" id="constructor">
|
|
Class Detail
|
|
</h2>
|
|
|
|
<div class="fixedFont">
|
|
<b>hcap.Media</b>()
|
|
</div>
|
|
|
|
<div class="description">
|
|
Interface for displaying and controlling the playback of media on the TV.
|
|
This class is not to be constructed directly (by user code).
|
|
hcap.Media has a change of status as follows.
|
|
<br><image src="./image/media_status.jpg">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.html#.createMedia">hcap.Media.createMedia()</a><br></dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!--
|
|
#### FIELD DETAILS
|
|
-->
|
|
|
|
<!--
|
|
#### METHOD DETAILS
|
|
-->
|
|
|
|
<section>
|
|
<div class="details props">
|
|
<div class="innerProps">
|
|
<h2 class="sectionTitle">
|
|
Method Detail
|
|
</h2>
|
|
|
|
<ul class="methodDetail" id="MethodDetail">
|
|
|
|
|
|
<li
|
|
class='item0'
|
|
>
|
|
<div class="fixedFont heading" id=".createMedia">
|
|
<span class='lighter'>
|
|
<static>
|
|
</span>
|
|
|
|
<span class="light">{Object}</span>
|
|
|
|
<span class="light">hcap.Media.</span><b>createMedia</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Create Media object.
|
|
The Media object provides the ability to play back video files and stream on a device.
|
|
<br/>
|
|
If an object is passed to the settings parameter, the function should try to initialize the internal
|
|
media player with the provided settings. If successful, the function should return an instance of
|
|
hcap.Media with a standardized interface for the internal media player. If the functions fails
|
|
to instantiate the internal media player to a playable state for any reason (such as media not found
|
|
or supported, or only one media player supported at a time), then the function should return null.<br/>
|
|
<br/>
|
|
If no object is passed to the settings parameter, then the function should return the last
|
|
non-destroyed hcap.Media instance, or null if there are no active media players.<br/>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{String} param.url [Required] - media url. As of API, the following protocols should be accepted.</li>
|
|
<div align=center>
|
|
<table class="hcap_spec" width=400>
|
|
<thead><tr><th>url</th></tr></thead>
|
|
<tbody>
|
|
<tr class="odd"><th class="odd">RTSP - (rtsp://1.2.3.4:554/video.mp4)</th></tr>
|
|
<tr><th>HTTP - (http://lge.com/movie.mp4)</th></tr>
|
|
<tr class="odd"><th class="odd">FILE - (file:///tmp/usb/usb1/example.mp4)</th></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<li>{String} param.mimeType [Required] - video mime type. please refer to table below.</li>
|
|
<div align=center>
|
|
<table class="hcap_spec" width=400>
|
|
<thead><tr><th>mimeType</th></tr></thead>
|
|
<tbody>
|
|
<tr class="odd"><th>'audio/x-ms-wma'</th></tr>
|
|
<tr><th>'audio/mpeg'</th></tr>
|
|
<tr class="odd"><th>'audio/mp3'</th></tr>
|
|
<tr><th>'video/mp4'</th></tr>
|
|
<tr class="odd"><th>'video/mpeg4'</th></tr>
|
|
<tr><th>'video/x-m4v'</th></tr>
|
|
<tr class="odd"><th>'video/mpeg'</th></tr>
|
|
<tr><th>'video/x-ms-wmv'</th></tr>
|
|
<tr class="odd"><th>'video/x-ms-asf'</th></tr>
|
|
<tr><th>'video/x-msvideo'</th></tr>
|
|
<tr class="odd"><th>'video/x-flv'</th></tr>
|
|
<tr><th>'application/x-mpegURL' (HTTP supports only)</th></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<li>{String} param.subtitleUrl [Optional] - subtitle url. As of API, the following protocols should be accepted.</li>
|
|
<div align=center>
|
|
<table class="hcap_spec" width=400>
|
|
<thead><tr><th>subtitleUrl</th></tr></thead>
|
|
<tbody>
|
|
<tr class="odd"><th class="odd">HTTP - (http://lge.com/movie.smi)</th></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Returns:</dt>
|
|
|
|
<dd><span class="light fixedFont">{Object}</span> hcap.Media</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#play">hcap.Media.play()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item1'
|
|
>
|
|
<div class="fixedFont heading" id="destroy">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>destroy</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Destroy the media playback. If you want to request channel change during playback then you should destroy media object.
|
|
Before destorying the media, please check the current media status is the stop.
|
|
If the media status is not the stop, please call hcap.Media.stop() and then call hcap.Media.destroy().
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.stop({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.destroy({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
hcap.Media.shutDown({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function. <br>
|
|
If a media is destroyed already, this callback function will be invoked.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#play">hcap.Media.play()</a><br>
|
|
<a href="hcap.Media.html#pause">hcap.Media.pause()</a><br>
|
|
<a href="hcap.Media.html#resume">hcap.Media.resume()</a><br>
|
|
<a href="hcap.Media.html#stop">hcap.Media.stop()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item2'
|
|
>
|
|
<div class="fixedFont heading" id="getAudioLanguage">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>getAudioLanguage</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Gets the list of supported audio languages and the index of list in the current media.<br>
|
|
Audio language list is composed of language codes and delimiter comma(',').<br>
|
|
Application can get/set audio language of the current media by index of the audio language list.<br><br>
|
|
If there is no audio language list of the current channel, only "xx" is returned as the audio language list.<br>
|
|
And "xx" could be returned as an audio language if the audio language is not mapped to an audio language code.<br>
|
|
The maximum number of audio language lists is supported up to 16. If the video has more than 16 languages, only 16 are displayed.<br>
|
|
|
|
<div align=center>
|
|
<table class="hcap_spec" width=400>
|
|
<thead>
|
|
<tr><th>Item</th><th>Value</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="odd"><th>audio language list</th><td>en,ko,fr,en,xx</td></tr>
|
|
<tr><th>index</th><td>0, 1, 2, 3, 4</td></tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr><th colspan="2">Audio Language List & Index Example</th></tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
If the application wants to set the audio language to French ('fr'), use the index '2'.<br>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.getAudioLanguage({
|
|
"onSuccess" : function(s) {
|
|
console.log("onSuccess audio language list : " + s.list + " index : " + s.index);
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function (param) {
|
|
// {String} param.list - audio language list string
|
|
// which is composed of language codes separated by delimiter comma(',').
|
|
// {Number} param.index - audio language index of the current media.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.12</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#setAudioLanguage">hcap.Media.setAudioLanguage()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item3'
|
|
>
|
|
<div class="fixedFont heading" id="getInformation">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>getInformation</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Gets information of media. For example, the title of the currently loaded media.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.getInformation({
|
|
"onSuccess" : function(s) {
|
|
console.log("onSuccess" +
|
|
"\nvideoAvailable = " + s.videoAvailable +
|
|
"\ntitle = " + s.title +
|
|
"\ncontentLengthInMs = " + s.contentLengthInMs);
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function (param) {
|
|
// {Boolean} param.videoAvailable - whether the video is available.
|
|
// {String} param.title - a human readable title of the current media.
|
|
// If the title is undetermined, this method returns null.
|
|
// {Number} param.contentLengthInMs - length (in milliseconds) of the media.
|
|
// If the length is infinite/indeterminable, then this method returns null.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item4'
|
|
>
|
|
<div class="fixedFont heading" id="getPlayPosition">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>getPlayPosition</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Gets the position (in milliseconds) in the media that the player is currently at.
|
|
If th length of the media is infinite/indeterminable, this function returns the number of milliseconds the player has been playing the media. The default position, before the video has been played, is 0 (unless override by the position setting).
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.getPlayPosition({
|
|
"onSuccess" : function(s) {
|
|
console.log("onSuccess position : " + s.positionInMs);
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function (param) {
|
|
// {Number} param.positionInMs - number of milliseconds the player is into the media
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#setPlayPosition">hcap.Media.setPlayPosition()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item5'
|
|
>
|
|
<div class="fixedFont heading" id="getPlaySpeed">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>getPlaySpeed</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
[RTSP Only] Gets the speed (rate) of the current media.
|
|
The speed (rate) at which the media is currently playing. If the media has not yet started playing or is stopped, this method returns 0.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.getPlaySpeed({
|
|
"onSuccess" : function(s) {
|
|
console.log("onSuccess speed : " + s.speed);
|
|
switch(s.speed) {
|
|
case 0 :
|
|
console.log("Playback has stopped");
|
|
break;
|
|
case 1 :
|
|
console.log("Media is playing");
|
|
break;
|
|
case 0.5 :
|
|
console.log("Media is playing at half speed");
|
|
break;
|
|
case 2 :
|
|
console.log("Media is fast-forwarding at 2x");
|
|
break;
|
|
case -2 :
|
|
console.log("Media is rewinding at 2x");
|
|
break;
|
|
}
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function (param) {
|
|
// {Number} param.speed - rate at which the media runs currently.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#setPlaySpeed">hcap.Media.setPlaySpeed()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item6'
|
|
>
|
|
<div class="fixedFont heading" id="getState">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>getState</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Gets player status. Status can be 'play', 'pause' or 'stop'.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.getState({
|
|
"onSuccess" : function(s) {
|
|
console.log("onSuccess state : " + s.state);
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function (param) {
|
|
// {String} param.state - a human readable status of the current media.
|
|
// It can be 'play', 'pause' or 'stop'.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item7'
|
|
>
|
|
<div class="fixedFont heading" id="getSubtitle">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>getSubtitle</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Gets the subtitle type and track number and ISO639-1 launguage code if available.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.getSubtitle({
|
|
"onSuccess" : function(s) {
|
|
console.log("onSuccess : subtitle type = " + s.type + "index = " + s.index + "language = " + s.list);
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// {Number} param.type - Current played subtitle type.
|
|
// {Number} param.index - Current played subtitle track number, On the case of external subtitle, don't care this value.
|
|
// {String} param.list - Language code of 'xx' if no available.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.22.0</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#setSubtitle">hcap.Media.setSubtitle()</a><br>
|
|
<a href="hcap.Media.SubtitleType.html#.NONE">hcap.Media.SubtitleType.NONE</a><br>
|
|
<a href="hcap.Media.SubtitleType.html#.INTERNAL_SUBTITLE">hcap.Media.SubtitleType.INTERNAL_SUBTITLE</a><br>
|
|
<a href="hcap.Media.SubtitleType.html#.EXTERNAL_SUBTITLE">hcap.Media.SubtitleType.EXTERNAL_SUBTITLE</a><br>
|
|
<a href="hcap.Media.SubtitleType.html#.CLOSED_CAPTION">hcap.Media.SubtitleType.CLOSED_CAPTION</a></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item8'
|
|
>
|
|
<div class="fixedFont heading" id="getSubtitleOn">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>getSubtitleOn</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Gets the subtitle status of the current media.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.getSubtitleOn({
|
|
"onSuccess" : function(s) {
|
|
console.log("onSuccess : subtitleOn = " + s.subtitleOn);
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// {Boolean} param.subtitleOn - true if the media subtitle is on. false if it is off.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.7</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#setSubtitleOn">hcap.Media.setSubtitleOn()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item9'
|
|
>
|
|
<div class="fixedFont heading" id="pause">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>pause</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Pause the media playback.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"repeatCount" : 2,
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.pause({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function. <br>
|
|
If a media is paused already, this callback function will be invoked.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#play">hcap.Media.play()</a><br>
|
|
<a href="hcap.Media.html#resume">hcap.Media.resume()</a><br>
|
|
<a href="hcap.Media.html#stop">hcap.Media.stop()</a><br>
|
|
<a href="hcap.Media.html#destroy">hcap.Media.destroy()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item10'
|
|
>
|
|
<div class="fixedFont heading" id="play">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>play</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Starts playing a media file or stream.
|
|
If the media file starts to play, then 'play_start' event will be invoked.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"repeatCount" : 2,
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Number} param.repeatCount [Optional] - repeat count. Default setting value is 1. If you want to play a media stream in infinite loop, set 0. </li>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function. <br>
|
|
If a media is played already, this callback function will be invoked.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1, 1.8 repeatCount</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#stop">hcap.Media.stop()</a><br>
|
|
<a href="hcap.Media.html#pause">hcap.Media.pause()</a><br>
|
|
<a href="hcap.Media.html#resume">hcap.Media.resume()</a><br>
|
|
<a href="hcap.Media.html#destroy">hcap.Media.destroy()</a><br>
|
|
<a href="_global_.html#event:media_event_received">media_event_received</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item11'
|
|
>
|
|
<div class="fixedFont heading" id="resume">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>resume</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Resume the media playback.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"repeatCount" : 2,
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.pause({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.resume({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function. <br>
|
|
If a media is resumed already, this callback function will be invoked.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#play">hcap.Media.play()</a><br>
|
|
<a href="hcap.Media.html#stop">hcap.Media.stop()</a><br>
|
|
<a href="hcap.Media.html#pause">hcap.Media.pause()</a><br>
|
|
<a href="hcap.Media.html#destroy">hcap.Media.destroy()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item12'
|
|
>
|
|
<div class="fixedFont heading" id="setAudioLanguage">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>setAudioLanguage</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Sets the audio language of the current media.<br>
|
|
|
|
<div align=center>
|
|
<table class="hcap_spec" width=400>
|
|
<thead>
|
|
<tr><th>Item</th><th>Value</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="odd"><th>audio language list</th><td>en,ko,fr,en,xx</td></tr>
|
|
<tr><th>index</th><td>0, 1, 2, 3, 4</td></tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr><th colspan="2">Audio Language List & Index Example</th></tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.setAudioLanguage({
|
|
"index" : 1,
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Number} param.index [Required] - audio language index to be set. Index starts with 0.</li>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No Parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.<br>
|
|
Setting to the same audio language index as before will invoke this callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.12</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#getAudioLanguage">hcap.Media.getAudioLanguage()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item13'
|
|
>
|
|
<div class="fixedFont heading" id="setPlayPosition">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>setPlayPosition</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Sets the position of the player at which to continue playing the media at.
|
|
The 'seek_done' event will notify the result of this call.
|
|
If you want to use this method continuously, you should check to receive the "seek_done" event before the next invocation.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">
|
|
var media = null;
|
|
document.addEventListener(
|
|
"media_event_received",
|
|
function (param) {
|
|
// {String} param.eventType - changed event type
|
|
console.log("event type = " + param.eventType);
|
|
if (param.eventType === 'seek_done') {
|
|
console.log("success about media.setPlayPosition ");
|
|
} else if (param.eventType === 'play_start') {
|
|
media.setPlayPosition({
|
|
"positionInMs" : 1000,
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
}
|
|
}, false
|
|
);
|
|
|
|
hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Number} param.positionInMs [Required] - number of milliseconds from the start of the media the player should play from </li>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#getPlayPosition">hcap.Media.getPlayPosition()</a><br>
|
|
<a href="hcap.Media.html#play">hcap.Media.play()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item14'
|
|
>
|
|
<div class="fixedFont heading" id="setPlaySpeed">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>setPlaySpeed</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
[RTSP Only] Sets the speed (rate) of the current media.
|
|
If the media has not been started yet, calling this function (with any rate other then 0) will start the media at the specified rate.
|
|
When the current media passed through http protocol, this API supports only fast forward.
|
|
In mms and rtsp streaming, the speed parameter is transparently transmitted to the server without any conversion.
|
|
Therefore, developers are responsible for matching the speed parameter between the application and the server.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.setPlaySpeed({
|
|
"speed" : 2,
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Number} param.speed [Required] - rate at which the media should run</li>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#getPlaySpeed">hcap.Media.getPlaySpeed()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item15'
|
|
>
|
|
<div class="fixedFont heading" id="setSubtitle">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>setSubtitle</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Sets the subtitle type and track number
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.setSubtitle({
|
|
"type" : hcap.Media.SubtitleType.INTERNAL_SUBTITLE,
|
|
"index" : 0,
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Number} param.type [Required] - Support 3 type of subtitle following as none, internal subtitle, external subtitle, closed caption.</li>
|
|
<li>{Number} param.index [Required] - Subtitle index to be set. Index starts with 0. onthe case of external subtitle, don't care this value.</li>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.22.0</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#getSubtitle">hcap.Media.getSubtitle()</a><br>
|
|
<a href="hcap.Media.SubtitleType.html#.NONE">hcap.Media.SubtitleType.NONE</a><br>
|
|
<a href="hcap.Media.SubtitleType.html#.INTERNAL_SUBTITLE">hcap.Media.SubtitleType.INTERNAL_SUBTITLE</a><br>
|
|
<a href="hcap.Media.SubtitleType.html#.EXTERNAL_SUBTITLE">hcap.Media.SubtitleType.EXTERNAL_SUBTITLE</a><br>
|
|
<a href="hcap.Media.SubtitleType.html#.CLOSED_CAPTION">hcap.Media.SubtitleType.CLOSED_CAPTION</a></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item16'
|
|
>
|
|
<div class="fixedFont heading" id="setSubtitleOn">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>setSubtitleOn</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Sets the subtitle of the current media on or off.
|
|
If the subtitle url is not ready, there is no effect on screen. It will work after setting subtitle url using createMedia or setSubtitleUrl.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.setSubtitleOn({
|
|
"subtitleOn" : true,
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Boolean} param.subtitleOn [Required] - true if the media subtitle is on. false if it is off.</li>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.7</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#getSubtitleOn">hcap.Media.getSubtitleOn()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item17'
|
|
>
|
|
<div class="fixedFont heading" id="setSubtitleUrl">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>setSubtitleUrl</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Sets the subtitle url of the current media. It will replace the subtitle url which is registered by createMedia().
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.setSubtitleUrl({
|
|
"subtitleUrl" : "http://lge.com/subtitle.srt",
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{String} param.subtitleUrl [Required] - subtitle url.</li>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.7</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#setSubtitleOn">hcap.Media.setSubtitleOn()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item18'
|
|
>
|
|
<div class="fixedFont heading" id=".shutDown">
|
|
<span class='lighter'>
|
|
<static>
|
|
</span>
|
|
|
|
|
|
|
|
<span class="light">hcap.Media.</span><b>shutDown</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Shuts down media channel.
|
|
You should call hcap.Media.shutDown() after invoking hcap.Media.destroy() if there is no more need to use media player.
|
|
After this method is invoked, TV input will be changed to last configuration without any notification.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.stop({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.destroy({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
hcap.Media.shutDown({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function. <br>
|
|
If a media channel shuts down, this callback function will be invoked.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.8</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#.startUp">hcap.Media.startUp()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item19'
|
|
>
|
|
<div class="fixedFont heading" id=".startUp">
|
|
<span class='lighter'>
|
|
<static>
|
|
</span>
|
|
|
|
|
|
|
|
<span class="light">hcap.Media.</span><b>startUp</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Starts up media channel which is one of input source on TV. So you should call this method before making hcap.Media object.
|
|
And you should call hcap.Media.shutDown() after invoking hcap.Media.destroy() for finalizing media channel.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function. <br>
|
|
If a media channel starts up, this callback function will be invoked.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.8</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#.shutDown">hcap.Media.shutDown()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
<div class="hr"></div>
|
|
</li>
|
|
|
|
<li
|
|
class='item20'
|
|
>
|
|
<div class="fixedFont heading" id="stop">
|
|
<span class='lighter'>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<b>stop</b>(param)
|
|
</div>
|
|
|
|
<div class="description">
|
|
Stops the media playback.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre class="code prettyprint">hcap.Media.startUp({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
var media = hcap.Media.createMedia({
|
|
"url" : "http://media_server_url/media_file.avi",
|
|
"mimeType" : "video/mp4",
|
|
"subtitleUrl" : "http://media_server_url/media_file.smi"
|
|
});
|
|
media.play({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
media.stop({
|
|
"onSuccess" : function() {
|
|
console.log("onSuccess");
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});
|
|
},
|
|
"onFailure" : function(f) {
|
|
console.log("onFailure : errorMessage = " + f.errorMessage);
|
|
}
|
|
});</pre>
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{Object}</span> <b>param</b>
|
|
|
|
</dt>
|
|
<dd><ul>
|
|
<li>{Function} param.onSuccess [Optional] - success callback function. <br>
|
|
If a media is stopped already, this callback function will be invoked.
|
|
<pre class="code prettyprint">
|
|
param.onSuccess = function() {
|
|
// No parameter.
|
|
}</pre>
|
|
</li>
|
|
<li>{Function} param.onFailure [Optional] - failure callback function.
|
|
<pre class="code prettyprint">
|
|
param.onFailure = function (param) {
|
|
// {String} param.errorMessage - in case of failure, this message provides the details.
|
|
}</pre>
|
|
</li>
|
|
</ul></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="detailList nomargin">
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">Since:</dt>
|
|
<dd>1.3.1</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="detailList params">
|
|
<dt class="heading">See:</dt>
|
|
|
|
<dd><a href="hcap.Media.html#play">hcap.Media.play()</a><br>
|
|
<a href="hcap.Media.html#pause">hcap.Media.pause()</a><br>
|
|
<a href="hcap.Media.html#resume">hcap.Media.resume()</a><br>
|
|
<a href="hcap.Media.html#destroy">hcap.Media.destroy()</a><br></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
|
|
<!--
|
|
#### EVENT DETAILS
|
|
-->
|
|
|
|
</article>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
wbos.CssTools.MediaQueryFallBack.LoadCss('../css/screen.css', '../css/handheld.css', 660)
|
|
codeview.classFilter.Init()
|
|
</script>
|
|
<script src="../javascript/highlighter/prettify.js"></script>
|
|
<script>prettyPrint();</script>
|
|
</body>
|
|
</html>
|
|
|