rhysmorgan134 / node-CarPlay

MIT License
147 stars 25 forks source link

Video not playing #78

Open abuharsky opened 8 months ago

abuharsky commented 8 months ago

Hi, for some reason video not playing from node app on my car Head Unit browser.

Is it possible to stream it as sequense of images, that can be rendered inside <image src...?

what type of data inside message with type "Video"?

abuharsky commented 8 months ago

Something like this

this

camera.html

`<!DOCTYPE html>

ipCam

ipCam

`

motionjpeg.js

` function motionjpeg(id) { var image = $(id), src;

if (!image.length) return;

src = image.attr("src");
if (src.indexOf("?") < 0) {
    image.attr("src", src + "?"); // must have querystring
}

image.on("load", function() {
    // this cause the load event to be called "recursively"
    this.src = this.src.replace(/\?[^\n]*$/, "?") +
        (new Date()).getTime(); // 'this' refers to the image
});

}

https://stackoverflow.com/questions/19346775/rendering-mjpeg-stream-in-html5

steelbrain commented 8 months ago

Hi, for some reason video not playing from node app on my car Head Unit browser.

Does any h264 video play at all in your browser? If not, I think it may be easier/simpler to fix that instead of trying to render a sequence of h264 frames as images

abuharsky commented 8 months ago

This one works

https://html5videoplayer.net/html5video/mp4-h-264-video-test/

abuharsky commented 8 months ago

IMG_4730

abuharsky commented 8 months ago

Jmuxer sample not working

IMG_4732

steelbrain commented 8 months ago

@abuharsky Is it possible at all to get some console logs from that browser? That would help us understand a bit more about why it's failing. Also if you could check if the browser has a chrome://gpu or about:support page, a screenshot of that would be helpful as well