Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

[Node-webkit] Source ts from web with callback of javascript Uint8Array #27

Closed
ghost opened this issue Aug 27, 2015 · 1 comment
Closed

Comments

@ghost
Copy link

ghost commented Aug 27, 2015

I working in node-webkit so I have access to DOM and Node.js.

I want to be able to get ts chunks from website then covert to mp4 and output the data as a Uint8Array to use with the new MediaSource API

example of what it would look like


var ms = new MediaSource();

var video = document.getElementById('stream')
video.src = window.URL.createObjectURL(ms);

ms.addEventListener('sourceopen', function(e) {

    sourceBuffer = ms.addSourceBuffer(['video/mp4; codecs="avc1.42E01E,mp4a.40.2"']);

    mpegts_to_mp4('http://example.com/src.ts',  function (err, array) {
        sourceBuffer.appendBuffer(array); //must be Uint8Array
    });

}, false);
@RReverser
Copy link
Owner

Duplicate of #20 (and #17). Please look through the issues before opening new one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant