Modify some codes so that Youku and ckplayer can overwrite Some APIs played by Youku.

Source: Internet
Author: User

An online teaching system is being developed. One feature is online video learning.

The requirement is that after a certain period of time, a layer-covered video will pop up, and the correct answer will continue. After playing the video, modify the data and learn this chapter.

The error message is that the host is suspended.

It is mainly implemented as a div covering layer to block online videos such as Youku.

CSS style,Position: absolute; Z-index: 780This does not need to be explained much.

 

Official Youku playerCode(PS. For the first video, I directly paste "embed", "object", and "query data". There are no direct events or APIs. Please advise if you know any of them)

// Bind a submit event for the answer button
$ (Document). Ready (

APIs are APIs for video playback, rather than uploading and logging in.

There are too few posts on the official website.

I picked a few items from Youku Js.

Function (){
VaR youkuid = $ ("# youkuvideoid"). Val ();
Player = new yku. Player ('youkuplayer ',{
Client_id: 'Your youkuopenapi appid ',
Vid: youkuid,
Events :{
'Onplayerready': onyoukuplayerready, // The player is ready to call.
'Onplayend': onyoukuplayend,
'Onplaystart': onyokuplaystart
},
Width: 570,
Height: 300,
Autoplay: True,
Show_related: false
}
);

PS (autoplay: True, which indicates automatic playback, but not actually ......

)

To overwrite data, you must add an attribute <Param name = "wmode" value = "Transparent"/>

 

Find Youku's Js and find <Param locate and add a <Param name = wmode value = transparent>

The same is true for ckeditor. You need to modify the two parts.

<Param name = 'wmode' value = 'transparent'>

S + = This. getparam (p) ['wmode'];

VaR Params = {bgcolor: '# fff', allowfullscreen: True, allowScriptAccess: 'always', wmode: 'transparent '}; // other parameters of the player, such as the background color (different from B in flashvars), whether full screen and interaction are supported.

There is another problem. Ckeditor can play HTTP URLs, but FTP URLs have no images and sound. It is normal to map FTP to HTTP using a software program.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.