Comments (2)
from h265player.
config.js 中的这个吗?
const BUFFER = {
//单位秒
maxDuration: 30,
maxSize: 1024 * 1000 * 1000,
maxRetryCount: 3
}
HLSLoader.js中这两个没有相应的控制代码。之定义了一下。
maxBufferDuration = BUFFER.maxDuration
maxBufferSize = BUFFER.maxSize
提个修改建议 :如果有更好的解决思路据更好了。
Element.js中
static adaptSizeElement(width, height, $container, $element) {
const $box = $container
const $canvas = $element
$canvas.width = width || $canvas.width || $box.offsetWidth
$canvas.height = height || $canvas.height || $box.offsetHeight
const canvasWidth = $canvas.width
const canvasHeight = $canvas.height
let proportion = 0
$canvas.style.position = 'absolute'
if ($box.offsetWidth <= 0) {
$box.style.width = canvasWidth + 'px'
}
if ($box.offsetHeight <= 0) {
$box.style.height = canvasHeight + 'px'
}
const widthProportion = $box.offsetWidth / canvasWidth
const heightProportion = $box.offsetHeight / canvasHeight
if (heightProportion > widthProportion) {
proportion = widthProportion
} else {
proportion = heightProportion
}
$canvas.style.top = $box.offsetTop + (($box.offsetHeight - canvasHeight * proportion) / 2) + 'px'
****$canvas.style.left = 0+'px'//$box.offsetLeft + (($box.offsetWidth - canvasWidth * proportion) / 2) + 'px'
//$canvas.style.transform = `scale(${proportion }, ${proportion }) //页面发生伸缩的时候定位会错位。 我的做法直接铺满screen_canve
$canvas.style.transform = `scale(${widthProportion}, ${heightProportion})`****
$canvas.style['transform-origin'] = `top left`;
$canvas.style.display = 'inline-block'
}
}
from h265player.
Related Issues (20)
- 现在h264编码的视频格式有哪些?按照例子试了下,好像只有m3u8的才可以,MP4格式的还不行 HOT 3
- mp4 还会支持吗?
- 运行自己的m3u8视频地址时, 报异常Cannot set property 'partEnd' of null HOT 3
- 本项目开源协议是什么? HOT 1
- 有构建好的,支持mp4播放的SDK吗 HOT 2
- H.265 Player 在线播放器 MP4 示例无法正常播放 HOT 10
- h265的.m3u8直播流只加载一次m3u8,只拿到一次分片ts HOT 1
- npm run dev 一直跑不起来 HOT 3
- 如何集成SIMD指令集
- player.destroy()
- Please update ffmpeg (maybe with ffmpeg.wasm)
- ProgressBar update wrong timer when first decoded frame's pts is not 0 HOT 2
- 无法播放h.263编码的mp4格式的视频 HOT 1
- npm run dev:卡在编译过程中 HOT 2
- 目前支持 HLS 直播流么?
- 可以支持硬解码吗?
- Get the m3u8 file error
- 请问支持直播了么?
- 你好,请问支持直播吗,hls、flv HOT 1
- 能不能把hls api设计类似成MSE SourceBuffer.appendBuffer那种形式可以自由的追加ts片段
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 h265player.