GithubHelp home page GithubHelp logo

mediaserver's People

Contributors

adrum avatar btmdave avatar kevinsoulat avatar obastemur avatar whxaxes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mediaserver's Issues

Node js crashes when i am trying to play.

This is my exception from node js

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type number
at Function.from (buffer.js:305:9)
at writetop (/Users/vidhya/Documents/youtubify/node_modules/express-session/index.js:285:22)
at ServerResponse.end (/Users/vidhya/Documents/youtubify/node_modules/express-session/index.js:339:16)
at ReadStream. (/Users/vidhya/Documents/youtubify/node_modules/mediaserver/index.js:131:13)
at ReadStream.emit (events.js:210:5)
at ReadStream.EventEmitter.emit (domain.js:478:20)
at internal/fs/streams.js:230:14
at FSReqCallback.oncomplete (fs.js:146:23)

cannot start server

/Volumes/WS/tmp/node_modules/mediaserver/index.js:123
        res.write("Media format couldn't found for " + pathmodule.basename(pat
                                                       ^
ReferenceError: pathmodule is not defined
    at Object.exports.pipe (/Volumes/WS/tmp/node_modules/mediaserver/index.js:123:56)
    at Server.<anonymous> (/Volumes/WS/tmp/airplay.js:39:6)
    at Server.emit (events.js:110:17)
    at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:491:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:111:23)
    at Socket.socketOnData (_http_server.js:343:22)
    at Socket.emit (events.js:107:17)
    at readableAddChunk (_stream_readable.js:163:16)
    at Socket.Readable.push (_stream_readable.js:126:10)
    at TCP.onread (net.js:538:20)

mp3 files continue past time

Have you noticed that with audio files (mp3) they continue to play a few seconds past when they "should". Specifically testing in html5. For example, if you serve an mp3 file and load up the url directly in chrome, it will reach the end but continue playing slightly past the time. Any ideas why this could be?

Example doesn't work on Desktop and Mobile Safari

Hi @obastemur first of all thank you for a very useful library!

I'm trying to run the example that is included in the library and it works on all browsers except desktop Safari.

The same problem occurs when I try to stream my own MP3s. I haven't been able to figure out why, have you noticed this before?

Thank you very much!

-Ricardo.

Transcode

Any plans to add a transcode for possibilty to reduce data streaming?

Origin is not allowed by Access-Control-Allow-Origin

Hi,
what can i do if i get the following error?
"Origin is not allowed by Access-Control-Allow-Origin"

i have tried to modify your response header in index.js like this:

res.writeHead(
206,
{
"Access-Control-Allow-Credentials": true,
"Access-Control-Allow-Origin": (req.headers.origin || "_"),
'Accept-Ranges': 'bytes',
'Content-Range': 'bytes ' + range[0] + '-' + range[1] + '/' + total,
'Content-Length': range[2],
'Content-Type': type,
"Access-Control-Max-Age": 60_60_24_365, // Seconds.
"Access-Control-Allow-Methods": "GET,PUT,POST,DELETE",
"Access-Control-Allow-Headers": "Content-Type"
}
);

but if i do like this i get null error and an empty response on the client and nothing happends...
any suggestion?

start and end time

Assumed that as you suggests that media server can stream from a specific frame position as for here #6
it's not clear to me how to handle this on the client side. I mean I have start and end times in seconds. Of course I have the mp3 file info from ffprobe so I should calcolate by my self the frames and cut the audio file before then passing it to the mediaserver?
In that case it's just a cut with ffmpeg but it would prefer to do this in streaming without cutting the file.

Since you are using the method getRange like

var range = getRange(req, total);

I assume I could send you a req.headers.range to support this, right? If so could you make an example of the range, it seems it's like a bytes range separated with a -, so it's to me like

setHeader('range:'+ start_bytes+'-'+end_bytes)

Thank you.

Can't play webm files

I tried to pipe .webm files. Doesn't seem to work. Is anyone else facing this issue. Any solutions to this??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.