定制 libcast/html5player-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

libcast/html5player-client

Composer 安装命令:

composer require libcast/html5player-client

包简介

Libcast HTML5 Player JavaScript Client

README 文档

README

Installation and use

The script build/libcast_player_client.min.js must be included either inside the <head> document part, or at the end of the HTML page, just before the closing </body> tag.

Then you must instanciate one LibcastPlayer object per embed:

var player = new LibcastPlayer('player_id');

See tests/single_embed.html for a complete example of how to use this client.

After client instantiation, Libcast embeds should behave like the standard HTML5 MediaElement API (see https://developer.mozilla.org/en/docs/Web/API/HTMLMediaElement).

Available player methods

The following list of methods is available from embed <iframe> elements once the Libcast client has been instantiated.

  • play()
  • pause()
  • toggle() [*]
  • seek(seconds) [*] where seconds must be an integer or a float
  • chapter(number) [*] where number must be an integer
  • mute() [*]
  • setVolume(level) [**] where level must be a float between 0 and 1 (percentage)

(* non HTML5 MediaElement API standard)

(** a bit different from the HTML5 MediaElement API standard because of JavaScript limitations)

Available player attributes

The following list of attributes is available from embed <iframe> elements once the Libcast client has been instantiated.

  • volume
  • duration
  • currentTime

Available player events

The following list of events is emitted by embed <iframe> elements once the Libcast client has been instantiated.

  • loadedmetadata
  • loadeddata
  • canplay
  • play
  • playing
  • pause
  • timeupdate
  • volumechange
  • ended

Compile source

  1. Install npm (Node) on your machine

  2. Install grunt

    npm install -g grunt-cli
    
  3. Install npm dependencies

    npm install
    
  4. Build source

    grunt
    

This should compile source under the /build directory.

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2015-11-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固