Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youku #30

Closed
maltebeckmann opened this issue Jan 14, 2017 · 12 comments
Closed

Youku #30

maltebeckmann opened this issue Jan 14, 2017 · 12 comments

Comments

@maltebeckmann
Copy link

maltebeckmann commented Jan 14, 2017

I just tried integrating a Youku video into a post using djangocms-video (==2.0.3). I couldn't get it work. Have any of you tried that at all? Does this plugin only work with Youtube and Vimeo? No matter how I amend the embed code url, I just can't get it to show up properly.

@FinalAngel
Copy link
Member

Hello @maltebeckmann it should work with any video that supports embed, djangocms-video basically renders the video as an iframe. A quick search reveals that you have to use something like:

http://player.youku.com/player.php/sid/XNDYwMTEzMTY0/v.swf

@maltebeckmann
Copy link
Author

Yes, that's the URL format I used. Am I just not posting this correctly: I suppose it needs to be entered in the Embed Video link field. Can you confirm this works for you?

@FinalAngel
Copy link
Member

@maltebeckmann it seems to be working from a correct link:

http://d.pr/i/wZMf

@maltebeckmann
Copy link
Author

maltebeckmann commented Jan 16, 2017

Ok, I am finally getting a proper error message! Had some horrid DNS issues here.

I am getting a /static/cms/js/libs/swfobject.min.js Failed to load resource: the server responded with a status of 404 (Not Found)

I am noticing that my browser is looking for
/static/cms/js/libs/swfobject.min.js
and
/static/cms/swf/player.swf

Both files are located under /cms/ but aren't there, despite me running collectstatic. Am I missing some config step?

@FinalAngel
Copy link
Member

@maltebeckmann that is awkward @maltebeckmann swfobject was required in previous versions of djangocms-video. Are you sure you are using >=2.0? The newer versions only use HTML5 video and are not requiring swfobject anywhere.

@maltebeckmann
Copy link
Author

pip freeze tells me I have djangocms-video==2.0.3

@maltebeckmann
Copy link
Author

maltebeckmann commented Jan 16, 2017

This is the page code that is being generated:

script type="text/javascript" src="/static/cms/js/libs/swfobject.min.js"></script

script type="text/javascript">//<![CDATA[
var flashvars = {};
flashvars.movie = "https://imgcache.qq.com/tencentvideo_v1/playerv3/TPout.swf?max_age=86400&v=20161117&vid=d0364y40wcp&auto=0" allowFullScreen="true" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash";

[...]

swfobject.embedSWF("/static/cms/swf/player.swf",
                   "flash-plugin-321",
                   "320", "240",
                   "9", "/static/cms/swf/expressInstall.swf",
                   flashvars, params, attributes);

//]]></script

@FinalAngel
Copy link
Member

@maltebeckmann
Copy link
Author

maltebeckmann commented Jan 16, 2017

I found the exact same files under ~/.virtualenvs/eclink_env/lib/python3.4/site-packages/djangocms_video/templates/djangocms_video/default

But I do have aldryn-video==1.0.0 installed. Could that be interfering?
or an interference with cmsplugin_filer_video?

I don't have any missing migrations either.

@FinalAngel
Copy link
Member

@maltebeckmann not seing swfobject being used in aldryn-video

@maltebeckmann
Copy link
Author

I commented out cmsplugin_filer_video and that seems to have removed the old template stuff.

However, now I am getting a message in Chrome dev tools saying:

Resource interpreted as Document but transferred with MIME type application/x-shockwave-flash: "http://static.youku.com/v1.0.0684/v/swf/loader.swf?VideoIDS=XNDYwMTEzMTY0&w…526type%253D0%2526embsig%253D1_1484560838_a7115a5e0c44e085f42b23528b438d5f".

@FinalAngel
Copy link
Member

yeah thats something that comes from youku directly, the only alternative there would be to use their api and rewrite the frontend of djangocms-video to use that.

Closing now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants