SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question help me update this code for megavideo in prettyPhoto

    I made the changes but I think the code is outdated because it does not work for me

    Code:
    case 'youtube':
    correctSizes = _fitToViewport(movie_width,movie_height); // Fit item to viewport
    
    movie = 'http://www.megavideo.com/v/'+grab_param('v',pp_images[setPosition]);
    if(settings.autoplay) movie += "&autoplay=1";
    
    toInject = settings.flash_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);
    break;
    
    
    
    
    
    
    
    and
    
    
    
    function _getFileType(itemSrc){
    if (itemSrc.match(/megavideo\.com/i)) {
    return 'youtube';
    someone help me to upgrade this code ?
    Thanks

  2. #2
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this code is a functional but another script
    is to adapt to the prettyPhoto?

    Code:
    // Megavideo - Thanks to Robert Jandreu for suggesting this code!
    			} else if (URL.match(/megavideo\.com/i)) {
    				mediaType = 'obj';
    				mediaWidth = mediaWidth || "640px";
    				mediaHeight = mediaHeight || "360px";
    				mediaSplit = URL.split('=');
    				mediaId = mediaSplit[1];
    				preload = new Swiff('http://wwwstatic.megavideo.com/mv_player.swf?v='+mediaId, {
    					id: mediaId,
    					width: mediaWidth,
    					height: mediaHeight,
    					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
    					});
    				startEffect();

  3. #3
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this code is a functional but another script
    is to adapt to the prettyPhoto?

    Code:
    // Megavideo - Thanks to Robert Jandreu for suggesting this code!
    			} else if (URL.match(/megavideo\.com/i)) {
    				mediaType = 'obj';
    				mediaWidth = mediaWidth || "640px";
    				mediaHeight = mediaHeight || "360px";
    				mediaSplit = URL.split('=');
    				mediaId = mediaSplit[1];
    				preload = new Swiff('http://wwwstatic.megavideo.com/mv_player.swf?v='+mediaId, {
    					id: mediaId,
    					width: mediaWidth,
    					height: mediaHeight,
    					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
    					});
    				startEffect();


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •