Ignore:
Timestamp:
07/01/11 09:10:19 (2 years ago)
Author:
jeroen
Message:

made HTML5 sharing work with playlist + iframe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sharing/test/basic.html

    r1835 r1878  
    1818<div id="container"></div> 
    1919<script type="text/javascript"> 
    20 jwplayer("container").setup({ 
    21     file: 'http://content.bitsontherun.com/videos/bkaovAYt-364765.mp4', 
    22     image: 'http://content.bitsontherun.com/thumbs/bkaovAYt-480.jpg', 
    23     flashplayer: 'assets/jwplayer.swf', 
    24     height: 270, 
    25     plugins: { 
    26         '../src/sharing.js': { 
     20function loadPlayer(codelink) {  
     21    var options = { 
     22        file: 'http://content.bitsontherun.com/videos/bkaovAYt-364765.mp4', 
     23        image: 'http://content.bitsontherun.com/thumbs/bkaovAYt-480.jpg', 
     24        flashplayer: 'assets/jwplayer.swf', 
     25        height: 270, 
     26        width: 480 
     27    }; 
     28    if(codelink) {  
     29        options.plugins = { '../src/sharing.js': { 
    2730            code: '<iframe src="http://content.bitsontherun.com/previews/bkaovAYt-V7MoJd7l" width="480" height="270" frameborder="0" scrolling="auto"></iframe>', 
    2831            link: 'http://www.bigbuckbunny.org/' 
    29         } 
    30     }, 
    31     width: 480 
    32 }); 
     32        }}; 
     33    } else {  
     34        options.plugins = { '../src/sharing.js': {} }; 
     35    } 
     36    jwplayer("container").setup(options); 
     37}; 
    3338</script> 
    3439 
    35  
     40<ul> 
     41    <li><a href="javascript:loadPlayer(false)">Without options</a></li> 
     42    <li><a href="javascript:loadPlayer(true)">With options</a></li> 
     43</ul> 
    3644 
    3745<p> 
    38     This setup should show a dock button for embedding and one for sharing a video.<br/> 
    39     Upon click, a dialog box should render, with a background that obscures the video screen.<br/> 
    40     The share dialog should display two links that refer to Facebook and Twitter. 
     46    Without options, the plugin only displays the current URL as link and the FB/TW buttons.<br/> 
     47    With options, a custom link and code are shown.<br/> 
     48    The Facebook and Twitter links should be URL escaped so they appear correctly on the wall/tweet. 
    4149</p> 
    4250 
Note: See TracChangeset for help on using the changeset viewer.