Git Product home page Git Product logo

jsamf's People

Contributors

jamesward avatar w35l3y avatar warhammerkid avatar wendal 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  avatar  avatar

jsamf's Issues

Cannot parse AMF: "readByte is not defined"

I'm working on an HTML5 port of a Flash-based drawing replayer, and I'm stuck with parsing the actual AMF

var test = new XMLHttpRequest();
test.onload = function ()
{
	console.log(decodeAMF(this.response));
}
test.open("GET", "23828-24312.amf", true);
test.overrideMimeType("text/plain; charset=x-user-defined");
test.send();

and an error occurs with the following trace

readUInt30BE file:///E:/Projects/AMFFail/amf.js:449:9
readAMF0Object file:///E:/Projects/AMFFail/amf.js:816:9
readObject file:///E:/Projects/AMFFail/amf.js:784:14
decodeAMF file:///E:/Projects/AMFFail/amf.js:62:23
test.onload file:///E:/Projects/AMFFail/index.html:18:16

Converting the response to an array buffer with test.responseType = "arraybuffer"; and decoding that resulted in an object with a version of 0 and the header and messages were empty. Converting the array buffer to an Uint8Array resulted in the same error

Here is the AMF in question.

readFloat64xx doesn't work properly

Both functions readFloat64BE and readFloat64LE are buggy at the following line:

(((b5 & 0x7F) << 24) | (b6 << 16) | (b7 << 8) | b8).toString(2)

If you do, for example:
var b5 = 0, b6 = 0, b7 = 0, b8 = 0;

The expected value should be "0000000000000000000000000000000" (31 zeros), but instead it returns "0"

I solved it by using:

("000000000000000000000000000000" + (((b5 & 0x7F) << 24) | (b6 << 16) | (b7 << 8) | b8).toString(2)).substr(-31)

But this solution isn't cross-browser.

Tested on Firefox 12.0

Thank you for your great work.

RemoteObject

RemoteObject uses AMFChannel which extends NetConnectionChannel which uses a NetConnection

How to work with this using JSAMF?

Question re implementation

Hi James.
I hope you are well.
I'm wondering if you can help. I need a way of extracting AMF data from an RTMP video stream, and your JSAMF library may be able to help with that.
I am streaming video using nanocosmos encoder and it uses a method, onCuePoint to send cue points along with the stream.
In their test player (which is flash) these can easily be seen: (this vid may or may not be available when you get to view it)
https://www.nanocosmos.de/nanostream/player.html?id=rtmp://wowza.rgsit.com/podia2016rgsitcom2200/podiapull

My player is JWPlayer 7, and the viewers will not haver flash installed, hence my need to decode the AMF data so that I can do whatever I need to with it.

JWplayer has its on('meta') but when trying to set var a = BinaryToArray(event.metadata).toArray(); , for example, nothing happens.

I have most likely got something wrong, or perhaps the method in the encoder needs to match the JW method. I really don't know.

If you have any ideas at all, it would be great to hear from you. I realise that it is a while since you built this, but it looks like it could be a really useful mechanism for retrieving such data from video streams in a world where flash is very rapidly become persona non grata, especially on corporate networks.

Many thanks in advance,

Neil.

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.