Changeset 1879


Ignore:
Timestamp:
07/01/11 11:01:19 (23 months ago)
Author:
jeroen
Message:

started working on Flash version of plugin. Also added JS minification/image embedding

Location:
branches/sharing
Files:
12 added
7 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/sharing/build/build.xml

    r1827 r1879  
    1 <project name="Plugin" default="buildJS"> 
     1<project name="Plugin" default="buildAS"> 
    22 
    3     <target name="buildJS" depends="buildAS"> 
     3 
     4    <target name="buildJS"> 
    45        <java jar="yuicompressor.jar" fork="true"> 
    5             <arg line="'../src/sharing.js'"/> 
     6            <arg line="'../src/js/sharing.js'"/> 
    67            <arg line="-o '../sharing.js'"/> 
    78        </java> 
    8         <echo message="Minified javascript." /> 
    99        <exec executable="python"> 
    1010            <arg file="encode-images.py" /> 
    1111            <arg file="../sharing.js" /> 
    12             <arg file="../src/assets/" /> 
     12            <arg file="../assets/" /> 
    1313        </exec> 
    14         <echo message="Encoded images to base64." /> 
     14        <echo message="Compiled JS plugin." /> 
     15    </target> 
     16 
     17    <target name="buildAS" depends="buildJS"> 
     18        <exec executable="/Developer/SDKs/flex_sdk_4/bin/mxmlc" dir="../"> 
     19            <arg line="src/as/Sharing.as" /> 
     20            <arg line="-o sharing.swf" /> 
     21            <arg line="-sp src/as" /> 
     22            <arg line="-library-path+=libs" /> 
     23            <arg line="-load-externs=libs/jwplayer-5-classes.xml" /> 
     24            <arg line="-static-link-runtime-shared-libraries=true" /> 
     25            <arg line="-use-network=false" /> 
     26            <arg line="-optimize=true" /> 
     27            <arg line="-incremental=false" /> 
     28        </exec> 
     29        <echo message="Compiled SWF plugin." /> 
    1530    </target> 
    1631 
  • branches/sharing/build/encode-images.py

    r1827 r1879  
    1717    } 
    1818    for ext in extensions: 
    19         regex = re.compile('url\((\.*\/*)([a-zA-Z0-9-_/]+)\.%s\)' % ext) 
     19        regex = re.compile('(\.*\/*)([a-zA-Z0-9-_/]+)\.%s' % ext) 
    2020        matches = regex.finditer(css) 
    2121        if matches: 
  • branches/sharing/src/js/sharing.js

    r1878 r1879  
    112112    /** Set dock buttons when player is ready. **/ 
    113113    function _setup() { 
     114        if(_player.getRenderingMode() == 'flash') { return; } 
    114115        _player.getPlugin("dock").setButton('share',show,'../assets/share.png'); 
    115116        _div.onclick = _hide; 
     
    152153    /** Reposition elements upon a resize. **/ 
    153154    this.resize = function(width,height) { 
     155        if(_player.getRenderingMode() == 'flash') { return; } 
    154156        _style(_div,{ 
    155157            backgroundImage: 'url(../assets/sheet.png)', 
     
    181183 
    182184/** Register the plugin with JW Player. **/ 
    183 jwplayer().registerPlugin('sharing', template); 
     185jwplayer().registerPlugin('sharing', template,'./sharing.swf'); 
    184186 
    185187 
  • branches/sharing/test/basic.html

    r1878 r1879  
    2727    }; 
    2828    if(codelink) {  
    29         options.plugins = { '../src/sharing.js': { 
     29        options.plugins = { '../sharing.js': { 
    3030            code: '<iframe src="http://content.bitsontherun.com/previews/bkaovAYt-V7MoJd7l" width="480" height="270" frameborder="0" scrolling="auto"></iframe>', 
    3131            link: 'http://www.bigbuckbunny.org/' 
    3232        }}; 
    3333    } else {  
    34         options.plugins = { '../src/sharing.js': {} }; 
     34        options.plugins = { '../sharing.js': {} }; 
    3535    } 
    3636    jwplayer("container").setup(options); 
  • branches/sharing/test/iframe.html

    r1878 r1879  
    1818    image: 'http://content.bitsontherun.com/thumbs/bkaovAYt-480.jpg', 
    1919    flashplayer: 'assets/jwplayer.swf', 
    20     plugins: { '../src/sharing.js': {} }, 
     20    plugins: { '../sharing.js': {} }, 
    2121    height: 180, 
    2222    width: 320 
  • branches/sharing/test/index.html

    r1878 r1879  
    2020    <li><a href="playlist.html">Sharing in Playlist</a></li> 
    2121    <li><a href="iframed.html">Within an iFrame</a></li> 
     22    <li><a href="flash.html">Standalone Flash</a></li> 
    2223</ul> 
    2324 
  • branches/sharing/test/modes.html

    r1878 r1879  
    2525        image: 'http://content.bitsontherun.com/thumbs/bkaovAYt-480.jpg', 
    2626        height: 294, 
    27         plugins: {'../src/sharing.js': { 
     27        plugins: {'../sharing.js': { 
    2828            code: '<iframe src="http://content.bitsontherun.com/previews/bkaovAYt-V7MoJd7l" width="480" height="270" frameborder="0" scrolling="auto"></iframe>', 
    2929            link: 'http://www.bigbuckbunny.org/' 
  • branches/sharing/test/playlist.html

    r1878 r1879  
    2323        'playlist.position': 'right', 
    2424        'playlist.size': 320, 
    25         plugins: { '../src/sharing.js': {} }, 
     25        plugins: { '../sharing.js': {} }, 
    2626        width: 720 
    2727    }; 
Note: See TracChangeset for help on using the changeset viewer.