mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-09-26 23:05:55 +08:00
完成H265支持以及mp3格式支持
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -155,7 +155,7 @@ Jessibuca.prototype.initAudioPlay = function (frameCount, samplerate, channels)
|
||||
var _this = this
|
||||
var playNextBuffer = function () {
|
||||
isPlaying = false;
|
||||
console.log("~", audioBuffers.length)
|
||||
//console.log("~", audioBuffers.length)
|
||||
if (audioBuffers.length) {
|
||||
playAudio(audioBuffers.shift());
|
||||
}
|
||||
@@ -184,7 +184,7 @@ Jessibuca.prototype.initAudioPlay = function (frameCount, samplerate, channels)
|
||||
var playAudio = function (fromBuffer) {
|
||||
if (isPlaying) {
|
||||
audioBuffers.push(fromBuffer);
|
||||
console.log(audioBuffers.length)
|
||||
//console.log(audioBuffers.length)
|
||||
return;
|
||||
}
|
||||
isPlaying = true;
|
||||
|
@@ -5,6 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import StartTime from "./StartTime"
|
||||
export default {
|
||||
props: {
|
||||
data: Array
|
||||
@@ -23,7 +24,7 @@ export default {
|
||||
{
|
||||
title: "订阅时间",
|
||||
render(h, { row }) {
|
||||
return h("StartTime", {
|
||||
return h(StartTime, {
|
||||
props: {
|
||||
value: row.SubscribeTime
|
||||
}
|
||||
|
@@ -54,8 +54,8 @@
|
||||
:type="hardDiskStatus"
|
||||
>磁盘使用:{{networkFormat(HardDisk.Used,"M")}} 占比:{{HardDisk.Usage.toFixed(2)}}%</Alert>
|
||||
</div>
|
||||
<Jessibuca ref="jessibuca" v-model="showPreview"></Jessibuca>
|
||||
<Subscribers :data="currentStream && currentStream.SubscriberInfo" v-model="showSubscribers" />
|
||||
<Jessibuca ref="jessibuca" v-model="showPreview" :videoCodec="currentStream && CodecID(currentStream.VideoInfo.CodecID)" :audioCodec="currentStream && SoundFormat(currentStream.AudioInfo.SoundFormat)"></Jessibuca>
|
||||
<Subscribers :data="currentStream && currentStream.SubscriberInfo || []" v-model="showSubscribers" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
showPreview: false,
|
||||
showSubscribers: false,
|
||||
currentTab: "",
|
||||
currentStream: [],
|
||||
currentStream: null,
|
||||
typeMap: {
|
||||
Receiver: "📡",
|
||||
FlvFile: "🎥",
|
||||
@@ -181,10 +181,7 @@ export default {
|
||||
return item.SubscriberInfo ? item.SubscriberInfo.length : 0;
|
||||
},
|
||||
preview(item) {
|
||||
this.$refs.jessibuca.videoCodec = this.CodecID(item.VideoInfo.CodecID);
|
||||
this.$refs.jessibuca.audioCodec = this.SoundFormat(
|
||||
item.AudioInfo.SoundFormat
|
||||
);
|
||||
this.currentStream = item;
|
||||
this.$nextTick(() =>
|
||||
this.$refs.jessibuca.play(
|
||||
"ws://" + location.hostname + ":8080/" + item.StreamPath
|
||||
|
@@ -202,6 +202,9 @@ func (r *Room) PushAudio(audio *avformat.AVPacket) {
|
||||
}
|
||||
func (r *Room) setH264Info(video *avformat.AVPacket) {
|
||||
r.VideoTag = video
|
||||
if r.VideoInfo.CodecID != 7 {
|
||||
return
|
||||
}
|
||||
info := avformat.AVCDecoderConfigurationRecord{}
|
||||
//0:codec,1:IsAVCSequence,2~4:compositionTime
|
||||
if _, err := info.Unmarshal(video.Payload[5:]); err == nil {
|
||||
|
Reference in New Issue
Block a user