Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can Html5VideoPipeline support audio(AAC) from audio device #664

Open
touchsky2018 opened this issue Mar 31, 2022 · 1 comment
Open

Can Html5VideoPipeline support audio(AAC) from audio device #664

touchsky2018 opened this issue Mar 31, 2022 · 1 comment
Labels
bug Something isn't working streams Related to streams (media-stream-library-js package)

Comments

@touchsky2018
Copy link

touchsky2018 commented Mar 31, 2022

Can Html5VideoPipeline support audio(AAC) from audio device

There is a error when live audio with Html5VideoPipeline
Is that a bug? or any misstake in source?

-------------version-----------
10.4.1

--------------error------------------
media-stream-library.min.js:2 closing socket due to incoming error RangeError: "value" argument is out of bounds
at B (:4200/vendor.js:39070:37)
at Uint8Array.u.writeUint16BE.u.writeUInt16BE (:4200/vendor.js:39226:41)
at Ie.copy (:4200/vendor.js:45456:15)
at Me.copy (:4200/vendor.js:45934:59)
at De.copy (:4200/vendor.js:45934:59)
at De.copy (:4200/vendor.js:45934:59)
at De.copy (:4200/vendor.js:45934:59)
at De.copy (:4200/vendor.js:45934:59)
at De.copy (:4200/vendor.js:45934:59)
at De.copy (:4200/vendor.js:45934:59)

-------------source------------------

<video #audio autoplay controls="controls">

playAudio() {
var that = this;

// Grab a reference to the video element
const mediaElement3 = that.audio.nativeElement;

// Setup a new pipelineserver
this.pipeline3 = new pipelines.Html5VideoPipeline({
  ws: { uri: this.wsServer, timeout: 60000 },
  rtsp: { uri: this.rtspServer3 },
  mediaElement: mediaElement3
})

// Restart stream on RTCP BYE (stream ended)
this.pipeline3.rtsp.onRtcp = (rtcp: any) => {
  if (isRtcpBye(rtcp)) {
    console.log("---pipeline3.rtcp.bye");
    setTimeout(() => {
      that.playAudio();
    }, 0)
  }
}

this.pipeline3.rtsp.onError = (err: RTSPResponseError) => {
  console.log("---pipeline3.rtsp.onError--" + err.code + "--" + err.message);
}

this.pipeline3.ready.then(() => {
  that.pipeline3.rtsp.play();
  console.log("---pipeline3.rtsp.play");
})
.catch((err: any) => {
  console.log("rtsp error:" + err);
  this.pipeline3 && this.pipeline3.close();
})

}

@touchsky2018 touchsky2018 added the question Discussion about functionality label Mar 31, 2022
@lekoaf lekoaf added the streams Related to streams (media-stream-library-js package) label Jan 25, 2023
@steabert steabert added bug Something isn't working and removed question Discussion about functionality labels Mar 18, 2023
@steabert
Copy link
Member

Possibly mitigated by #769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working streams Related to streams (media-stream-library-js package)
Projects
None yet
Development

No branches or pull requests

3 participants