Changeset 1344
- Timestamp:
- 09/29/10 18:33:09 (3 years ago)
- Location:
- trunk/fl5/doc
- Files:
-
- 5 edited
-
JWPlayerEmbedGuide.pdf (modified) (previous)
-
JWPlayerFlash.pdf (modified) (previous)
-
publishers/embedding.rst (modified) (2 diffs)
-
publishers/javascriptapi.rst (modified) (7 diffs)
-
publishers/releasenotes.rst (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fl5/doc/publishers/embedding.rst
r1342 r1344 179 179 <video class="jwplayer" src="/uploads/video.mp4" poster="/uploads/image.jpg"></video> 180 180 181 That's it! As long as you have everything in the right place, the <video> tagwill be replaced on your page by the JW Player.181 That's it! As long as you have everything in the right place, all <video> tags on your page whose class is **jwplayer** will be replaced on your page by the JW Player. 182 182 183 183 … … 446 446 </script> 447 447 448 See the :ref:`API reference < api>` for a full overview of all events and their properties.448 See the :ref:`API reference <javascriptapi>` for a full overview of all events and their properties. 449 449 450 450 .. _embed_players: -
trunk/fl5/doc/publishers/javascriptapi.rst
r1342 r1344 12 12 --------------- 13 13 14 To get a sense of the possibilities, here's a quick example that showcases how to control the player from the page: 14 First, you'll need to upload the API library (*jwplayer.js*) to your web server. We recommend putting it, along with *player.swf*, in a folder called **jwplayer** in the root of your site. Once it's on your web server, add this bit of code to your HTML pages, in the *<head>* of your page: 15 16 .. code-block:: html 17 18 <head> 19 <script type="text/javascript" src="/jwplayer/jwplayer.js"></script> 20 </head> 21 22 To get a sense of the possibilities of what you can do with the API, here's a quick example that showcases how to control the player from the page: 15 23 16 24 .. code-block:: html … … 20 28 <script type="text/javascript"> 21 29 jwplayer("container").setup({ 22 flashplayer: "/jwplayer/ jwplayer.swf",30 flashplayer: "/jwplayer/player.swf", 23 31 file: "/uploads/video.mp4", 24 32 height: 270, … … 40 48 <script type="text/javascript"> 41 49 jwplayer("container").setup({ 42 flashplayer: "/jwplayer/ jwplayer.swf",50 flashplayer: "/jwplayer/player.swf", 43 51 file: "/uploads/video.mp4", 44 52 height: 270, … … 61 69 * Listen to events from a player. 62 70 71 Embedding with SWFObject 72 ++++++++++++++++++++++++ 73 74 If you embed the player using SWFObject, rather than the built-in *setup()* function, you can still use the JavaScript API, although you'll need to wait for Flash to be loaded on the page before interacting with the API. SWFObject 2.2 includes a callback function (in this example, named **flashLoaded**) which is executed when SWFObject has finished embedding Flash into the page. Make sure you wait until this function is called before making any calls to the API. 75 76 Here's a simple example of using the `SWFObject callback <http://code.google.com/p/swfobject/wiki/api>`_: 77 78 .. code-block:: javascript 79 80 var flashvars = { file:"/videos/video.mp4" }; 81 var params = { allowfullscreen:"true", allowscriptaccess:"always" }; 82 var attributes = { id:"player", name:"player" }; 83 84 swfobject.embedSWF("/jwplayer/player.swf", "container", 320, 240, "9.0.115", "false", 85 flashvars, params, attributes, flashLoaded); 86 87 function flashLoaded(e) { 88 // e.ref is a reference to the Flash object. We'll pass it to jwplayer() so the API knows where the player is. 89 90 // Add event listeners 91 jwplayer(e.ref).onReady(function() { alert("Player is ready"); }); 92 jwplayer(e.ref).onPlay(function() { alert("Player is playing"); }); 93 94 // Interact with the player 95 jwplayer(e.ref).play(); 96 } 97 98 Embedding with an <object> or <embed> tag 99 +++++++++++++++++++++++++++++++++++++++++ 100 101 If you embed the player directly using an *<object>* or *<embed>* tag, simply pass your tag's id to the API when referencing the player: 102 103 .. code-block:: html 104 105 <embed 106 id="player" 107 name="player" 108 src="/jwplayer/player.swf" 109 width="320" 110 height="240" 111 allowscriptaccess="always" 112 allowfullscreen="true" 113 flashvars="file=/videos/video.mp4" 114 /> 115 116 <script type="text/javascript"> 117 jwplayer("player").onReady(function() { alert("Player is ready"); }); 118 jwplayer("player").onPlay(function() { alert("Player is playing"); }); 119 jwplayer("player").play(); 120 </script> 63 121 64 122 Selecting … … 75 133 Only when you have multiple players on a page, you need to be more specific on which player you want to interact with. In that case, there are three ways to select a player: 76 134 77 * With the *id* of the element you :ref:`instantiated <embed >` the player over:135 * With the *id* of the element you :ref:`instantiated <embedding>` the player over: 78 136 79 137 .. code-block:: javascript … … 280 338 ); 281 339 282 Note that our :ref:`official embed method <embed >` contains a shortcut for assigning event listeners, directly in the embed code:340 Note that our :ref:`official embed method <embedding>` contains a shortcut for assigning event listeners, directly in the embed code: 283 341 284 342 .. code-block:: html … … 288 346 <script type="text/javascript"> 289 347 jwplayer("container").setup({ 290 flashplayer: "/jwplayer/ jwplayer.swf",348 flashplayer: "/jwplayer/player.swf", 291 349 file: "/uploads/video.mp4", 292 350 height: 270, -
trunk/fl5/doc/publishers/releasenotes.rst
r1343 r1344 8 8 =========== 9 9 10 Build 1 25710 Build 1341 11 11 ---------- 12 12 … … 14 14 ++++++++++++ 15 15 16 * Included framedrop handling for both HTTP and RTMP streaming, allowing switches in case of insufficient client resources (e.g. a netbook attempting to play an HD stream. 16 * Included framedrop handling for both HTTP and RTMP streaming, allowing switches in case of insufficient client resources (e.g. a netbook attempting to play an HD stream.) 17 17 * Automatic fallback to Tunneled RTMP / RTMPe (in case regular RTMP is blocked). 18 18 * RTMP dynamic streaming can now be setup together with loadbalancing (using a SMIL XML file). … … 31 31 * Fixed a bug that caused the duration textfield of a playlistitem would not be placed to the right. 32 32 * Fixed a bug that caused PNG skin playlists not to show the item.png on rollout if there was no itemActive. 33 * Fixed a bug that prevented the thumbnail image to be displayed while playing audio-only RTMP streams or AAC files 34 * Fixed a bug that interfered with URL-encoded URIs 35 * Fixed audio file handling for live mp3 streams and other servers without content-length headers 36 * Fixed a bug in event ordering for the JavaScript API 37 * Fixed an issue preventing the controlbar buffer indicator from being displayed until after buffering was complete 38 * Fixed an intermittent issue with YouTube videos being cut off before the video is complete 39 40 A full changelog of Flash player updates can be found `here <http://developer.longtailvideo.com/trac/query?status=assigned&status=closed&status=new&status=reopened&group=type&order=type&col=id&col=summary&milestone=Flash+5.3&resolution=fixed>`_ 41 33 42 34 43 HTML5 Beta Player Integration
Note: See TracChangeset
for help on using the changeset viewer.
