Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Anon, I think this is an issue of poor documentation / too many different products (Flash, Flex, player, flvplayback component) with different versions.</p> <p>I was able to get the <code>.load()</code> call to work with all 5 arguments (and verified that it did start playing at the specified start time), but only by compiling a new <code>FLVPlayback_116.swc</code> from the latest Flex SDK source code (Flex 4.6 with <code>playerglobal.swc</code> version 11.6).</p> <p>See my <a href="http://onetacoshort.com/temp/FLVPlayback.jpg" rel="nofollow">screenshot</a>.</p> <p>Might as well see if it works for you. Here's what you'll need to do:</p> <ul> <li>Remove the FLVPlayback component from your library - this defines conflicting classes with the updated version.</li> <li>Download my <a href="http://onetacoshort.com/temp/FLVPlayback_116.swc" rel="nofollow">FLVPlayback_116.swc</a> library <ul> <li>Or <a href="http://onetacoshort.com/temp/FLVPlayback_116_air.swc" rel="nofollow">FLVPlayback_116_air.swc</a> if you're targeting Adobe AIR, not Flash Player / web</li> </ul></li> <li>In Flash, open the <code>File -&gt; ActionScript Settings</code> dialog, under the library path tab, click 'Browse to SWC file' and locate the <code>FLVPlayback_116.swc</code> file you just downloaded. My screenshot above shows this dialog and how the <code>FLVPlayback_116.swc</code> file is listed after being added.</li> <li>In the code (see below): <ul> <li>You need to set: <code>fl.video.VideoPlayer.iNCManagerClass = fl.video.NCManager;</code></li> <li>Rather than using <code>innerPlayer = vPlayer.getVideoPlayer</code> you'll need to use <code>innerPlayer = new VideoPlayer(width,height)</code> and then <code>addChild(innerPlayer)</code> and <code>innerPlayer.play()</code></li> <li>I had to add the <code>innerVideo.play()</code> call to start the video playing (which I assume the GUI would handle)</li> </ul></li> </ul> <p>Here's my code (also visible in the screenshot):</p> <pre><code>import fl.video.*; fl.video.VideoPlayer.iNCManagerClass = fl.video.NCManager; var innerPlayer = new VideoPlayer(640,480); addChild(innerPlayer); innerPlayer.load( "http://10.0.1.3/test.flv" , 0 // totalTime , false // isLive , 5 // startTime , 5 // duration ); innerPlayer.play(); </code></pre> <p>Also, you can see that my <code>describeType</code> of <code>VideoPlayer</code> shows the proper number of arguments:</p> <pre><code>&lt;method name="load" declaredBy="fl.video::VideoPlayer" returnType="void"&gt; &lt;parameter index="1" type="String" optional="false"/&gt; &lt;parameter index="2" type="Number" optional="true"/&gt; &lt;parameter index="3" type="Boolean" optional="true"/&gt; &lt;parameter index="4" type="Number" optional="true"/&gt; &lt;parameter index="5" type="Number" optional="true"/&gt; &lt;metadata name="__go_to_definition_help"&gt; &lt;arg key="pos" value="41308"/&gt; &lt;/metadata&gt; &lt;/method&gt; &lt;method name="play" declaredBy="fl.video::VideoPlayer" returnType="void"&gt; &lt;parameter index="1" type="String" optional="true"/&gt; &lt;parameter index="2" type="Number" optional="true"/&gt; &lt;parameter index="3" type="Boolean" optional="true"/&gt; &lt;parameter index="4" type="Number" optional="true"/&gt; &lt;parameter index="5" type="Number" optional="true"/&gt; &lt;metadata name="__go_to_definition_help"&gt; &lt;arg key="pos" value="34410"/&gt; &lt;/metadata&gt; &lt;/method&gt; </code></pre> <p><strong>UPDATE:</strong> I've updated the library so that you can instantiate an <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/video/FLVPlayback.html" rel="nofollow">FLVPlayback(w,h)</a> and hence apply skins or whatnot -- treat it just like you would the vPlayer in your code above (except I added the width/height constructor args, since the size used to come from the component on-stage). Instantiate it like so:</p> <pre><code> var vPlayer:FLVPlayback = new FLVPlayback(640,480); vPlayer.skin = "http://10.0.1.3/skin.swf"; // optional skin addChild(vPlayer); var innerPlayer = vPlayer.getVideoPlayer(vPlayer.activeVideoPlayerIndex); innerPlayer.load( "http://10.0.1.3/test.flv" , 0 // totalTime , false // isLive , 5 // startTime , 5 // duration ); </code></pre> <p>Note - to use a skin, I compiled one of the FLA examples from Flash CS6... I tried using a skin I found on the Internet and it didn't work - it was likely compiled for an older version. See this <a href="http://www.onetacoshort.com/temp/flv_skinned.jpg" rel="nofollow">skinned screenshot</a> and download my <a href="http://www.onetacoshort.com/temp/skin.swf" rel="nofollow">skin.swf</a>.</p> <p>Good luck, and let me know if you need further info!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload