Modify

Opened 11 years ago

Closed 10 years ago

Last modified 7 years ago

#11258 closed defect (fixed)

iframe YouTube embed

Reported by: Mitar Owned by: Tetsuya Morimoto
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)

Attachments (0)

Change History (10)

comment:1 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 11 years ago by Ryan J Ollos

mitar: If you'd like, I can give you commit access to push the change directly.

comment:3 Changed 11 years ago by Mitar

Why not. :-)

But now I see that this patch would break backwards compatibility. If somebody is having old style URLs (with /v/). We should try to parse both.

comment:4 Changed 11 years ago by Ryan J Ollos

Alright good sir, you now have r/w access to moviemacro.

In the past I just did a little bit of work on the plugin since lcordier doesn't seem to be around any longer. If you'd like to formally adopt the plugin, I can also set you as Component owner so that new tickets will be assigned to you. For now, I've just added you to the ACL for SVN access.

Btw, I'm planning to follow-up on your last email of ideas for improving trac-hacks as soon as I get the site fully up to par again.

comment:5 Changed 11 years ago by Mitar

No need for more official maintenance. I am just maintaining some old installations and fixing things as I encounter them. No time for something more.

comment:6 Changed 10 years ago by Tetsuya Morimoto

Owner: changed from Louis Cordier to Tetsuya Morimoto
Status: newassigned

comment:8 Changed 10 years ago by Tetsuya Morimoto

see also to pass parameters: #6374

comment:9 Changed 10 years ago by Tetsuya Morimoto

Resolution: fixed
Status: assignedclosed
Trac Release: 0.12

This change has been included in 0.3 version (ticket:12046#comment:2).

comment:10 Changed 10 years ago by Mitar

Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Tetsuya Morimoto.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.