web前端 html5 直播功能开发

一、 video.js 视频播放

        github:https://github.com/videojs/video.js

            基础代码:

	var player = videojs('my-player', options, function onPlayerReady() {
		videojs.log('Your player is ready!');

		// In this context, `this` is the player that was created by Video.js.
		this.play();

		// How about an event listener?
		this.on('ended', function() {
			videojs.log('Awww...over so soon?!');
		});
	});



            打开自动播放功能(支持android、IOS、pc):



二、 videojs-contrib-hls 直播功能

        github:https://github.com/videojs/videojs-contrib-hls

        

        android、IOS下需m3u8格式直播地址

        webkit等PC浏览器下需videojs-flash支持播放trmp


三、 videojs-flash chrome等浏览器辅助

github:https://github.com/videojs/videojs-flash

你可能感兴趣的:(javascript,html5)