上下文菜单

  抱歉,这篇文章有英文版

You can customize your context menu, which appears when you right-click on the player. 

Just enable the Right-click menu plugin in the PRO and configure the necessary items.

You can to specify a name and action for each menu item. The action can be a call the player API, the share plugin, exteranl JavaScript function or open a link.

  • api: for API commands
  • share: for sharing and social networks
  • url: to open link in the new tab
  • js: to call your external js function

Examples

api:

api:toggle will switch the playback mode.

api:loop,0/1 will switch the loop mode.

api:playlistloop,0/1 will switch the loop mode for the whole playlist.

api:autonext,0/1 will switch autoplay in playlist.

api:shuffle,0/1 will switch shuffle playback mode.

api:stretch,1/0 will stretch the video to fill all screen.

share:

For these commands the Share button must be enabled in the player interface.

share:url copies to the clipboard the share URL that is specified in the url parameter. You can also make an item in the menu with a share link with a time point. Just specify an URL using the url2 parameter with the {time} macros //site.com/video.php?t={time} and the action for the menu item in this case will be share:url2

share:embed will copy the iframe player code to the clipboard (the iframe URL must be specified to the player by the embed parameter).

share:facebook opens the export window to Facebook.

url:

url://site.com opens the link in a new browser tab.

js:

js:MyFunction,1,2 call your js function and pass it two values (1 and 2).


20.0.1
2024 © PlayerJS

登录

登录

免费注册

注册
注册即表示您同意服务条款
登录(如果您有帐户)

恢复密码

恢复
忘记电子邮件?联系我们