Opened 11 years ago

Last modified 6 years ago

#11258 closed defect

iframe YouTube embed — at Version 1

Reported by: Mitar Owned by: Louis Cordier
Priority: normal Component: MovieMacro
Severity: normal Keywords:
Cc: Mitar, Ryan J Ollos Trac Release: 0.12

Description (last modified by Ryan J Ollos)

YouTube uses iframe now to embed. This patch upgrades the macro to use it:

  • movie/macro.py

     
    9898            query_dict = xform_query(query)
    9999            video = query_dict.get('v')
    100100           
    101             url = urlunparse((scheme, netloc, '/v/%s' % video, '', '', ''))
     101            url = urlunparse((scheme, netloc, '/embed/%s' % video, '', '', ''))
    102102           
    103103            width = kwargs.pop('width', style_dict.get('width', '425px'))
    104104            height = kwargs.pop('height', style_dict.get('height', '344px'))
     
    108108                'height': height,
    109109            })
    110110           
    111             return tag.object(tag.param(name='movie', value=url),
    112                               tag.param(name='allowFullScreen', value='true'),
    113                               tag.embed(src=url, type='application/x-shockwave-flash', allowfullscreen='true', width=width, height=height),
    114                               style=xform_style(style))
     111            return tag.iframe(src=url, allowfullscreen='allowfullscreen', frameborder='0', width=width, height=height, style=xform_style(style))
    115112       
    116113        if netloc == 'video.google.com':
    117114            query_dict = xform_query(query)

Change History (1)

comment:1 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.