Comments (3)
请参考README的事件,onLoadFinsh onReadyShowDone 之后play
而且你这么playerObj.player.play() 这么调用做法就是错误的。 为什么要自己去操作里面的player对象,API是让你直接在playerObj操作的。
from h265web.js.
大佬您好,我按您说的改了之后确实没有报错了,但是为什么视频文件播放不出来,一直都是黑屏
`const PLAYER_CORE_TYPE_DEFAULT = 0; // 默认播放器内核
const PLAYER_CORE_TYPE_CNATIVE = 1; // 实验播放器内核
const token =
"base64:QXV0aG9yOmNoYW5neWFubG9uZ3xudW1iZXJ3b2xmLEdpdGh1YjpodHRwczovL2dpdGh1Yi5jb20vbnVtYmVyd29sZixFbWFpbDpwb3JzY2hlZ3QyM0Bmb3htYWlsLmNvbSxRUTo1MzEzNjU4NzIsSG9tZVBhZ2U6aHR0cDovL3h2aWRlby52aWRlbyxEaXNjb3JkOm51bWJlcndvbGYjODY5NCx3ZWNoYXI6bnVtYmVyd29sZjExLEJlaWppbmcsV29ya0luOkJhaWR1";
var config = {
player: "glplayer",
width: 960,
height: 540,
type: "raw265",
token: token,
extInfo: {
moovStartFlag: true
}
};
// const url = "test13.h265"
const url = "hevc_test_moov_set_head_16s.mp4"
let player = window.new265webjs(url, config);
player.onLoadFinish = function () {
console.log("load finish");
player.play()
}
player.onReadyShowDone = function(e) {
console.log("ready done");
}
player.do()`
from h265web.js.
onReadyShowDone 后面调用Play()
还有 浏览器里面不要自行 调用play函数,一定要进行交互式调用,就是必须用户点击才可以。不然浏览器安全限制会不让你播放。
改掉这个没用的坏习惯吧。
from h265web.js.
Related Issues (20)
- 国产统信操作系统播放异常 HOT 2
- 能否作为mse库整合入其他播放器
- 使用此款插件只能在联网环境下使用吗
- 切片报错: e.getContext is not a function
- websocket方式的H265的码流直流播放不出来的问题
- src/src-js/src/demuxer/flv-hevc/flv-hevc.js中,_skip_hrd_parameters方法定义缺少参数hvcc
- flv-hevc.js中_skip_hrd_parameters方法定义缺少参数hvcc,导致播放时报“hvcc is not defined”,播放黑屏 HOT 2
- 如何前端实现SEI增强数据 画框在视频上
- Uncaught (in promise) DOMException: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source (h265webjs-v20221106.js:85. HOT 1
- Invalid video packet type 81
- GetUriFormat中search参数识别为正则表达式导致类型识别非预期
- MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media.
- hls m3u8 or ts HEVC are not working
- 使用websocket获取H265直播裸流数据播放多个播放器视频播放延迟
- 播放 HLS ,视频中1秒,实际生活中花费2~3秒
- 使用了onLoadFinish的API,控制台一直循环报错
- 无法在微信打开,debug测试结果:无法install
- 希望配置项支持手动指定 DOM 元素
- 支持播放wmv格式的视频吗?
- 创建demo没有controller,调用全屏之后就显示控制器
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from h265web.js.