Giter Club home page Giter Club logo

amazon-fire-tv-stream's People

Contributors

frederichansen avatar sor3nt 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

amazon-fire-tv-stream's Issues

Thrift `setMediaSource` documentation

I noticed many of the bytes of the setMediaSource command are listed as "unknown code" in the source, so here's some basic documentation as seen via WireShark packet capture.

First is a setMediaSource for an image:

Thrift Protocol
CALL[ version:0x8001, seqid:0, method:setMediaSource]
    Version: 0x8001
    Message type: CALL (1)
    Length: 14
    Method: setMediaSource
    Sequence Id: 0
Data
    Type: T_UTF7 (11)
    Field Id: 1
    Length: 53
    UTF7 String: http://dapjudmz9fhj0.cloudfront.net/splash-firetv.png
    Type: T_UTF7 (11)
    Field Id: 2
    Length: 27
    UTF7 String: {"title":"Video & TV Cast"}
    Type: T_BOL (2)
    Field Id: 3
    Boolean: TRUE (1)
    Type: T_BOL (2)
    Field Id: 4
    Boolean: FALSE (0)
    Type: T_UTF7 (11)
    Field Id: 5
    Length: 226
    UTF7 String [truncated]: {\n  "Manufacturer" : "Apple",\n  "FlingSDKVersion" : "iOS-1.3.1",\n  "Uuid" : "3e7317172YNPY0Z2ASJ0LAKNLN2ZRVFP",\n  "OSVersion" : "iOS-10.3.2",\n  "DeviceModel" : "iPhone8,1",\n  "PackageName" : "iOS-de.2kit.cast
    Type: T_STOP (0)

and another for a video:

Thrift Protocol
CALL[ version:0x8001, seqid:0, method:setMediaSource]
    Version: 0x8001
    Message type: CALL (1)
    Length: 14
    Method: setMediaSource
    Sequence Id: 0
Data
    Type: T_UTF7 (11)
    Field Id: 1
    Length: 33
    UTF7 String: http://2kit.de/cast/demovideo.mp4
    Type: T_UTF7 (11)
    Field Id: 2
    Length: 98
    UTF7 String: {"title":"http:\/\/2kit.de","noreplay":true,"description":"http:\/\/2kit.de\/cast\/demovideo.mp4"}
    Type: T_BOL (2)
    Field Id: 3
    Boolean: TRUE (1)
    Type: T_BOL (2)
    Field Id: 4
    Boolean: FALSE (0)
    Type: T_UTF7 (11)
    Field Id: 5
    Length: 226
    UTF7 String [truncated]: {\n  "Manufacturer" : "Apple",\n  "FlingSDKVersion" : "iOS-1.3.1",\n  "Uuid" : "3e7317172YNPY0Z2ASJ0LAKNLN2ZRVFP",\n  "OSVersion" : "iOS-10.3.2",\n  "DeviceModel" : "iPhone8,1",\n  "PackageName" : "iOS-de.2kit.cast
    Type: T_STOP (0)

The detection doesn't work for me

I'm checking your code. It crashes for me since you use in line 65 the value 1 which cannot be converted to upper case. When I use instead the value 'IN' which will be resolved to 1 it does not return any data.

Any idea how I can make you code working? Btw please add your package.json so that we can know the versions you are using.

Discovering firetv communication port

Hi, thanks for writing this library!

I noticed the port is hard coded, and wanted to suggest how to find the correct port. The FireTV advertises a bonjour service named _amzn-wplay._tcp. Using any bonjour browser app or library will show this service and the correct port.

For example, on macOS you can run:

$ dns-sd -B _amzn-wplay._tcp local
Browsing for _amzn-wplay._tcp.local
DATE: ---Tue 06 Jun 2017---
10:01:38.843  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
10:01:38.843  Add        2   4 local.               _amzn-wplay._tcp.    amzn.dmgr:649079E36FF650C95604A3397843E704:QZT4YaSve2:325301

$ dns-sd -L "amzn.dmgr:649079E36FF650C95604A3397843E704:QZT4YaSve2:325301" _amzn-wplay
Lookup amzn.dmgr:649079E36FF650C95604A3397843E704:QZT4YaSve2:325301._amzn-wplay._tcp.local
DATE: ---Tue 06 Jun 2017---
10:02:02.821  ...STARTING...
10:02:02.822  amzn\.dmgr:649079E36FF650C95604A3397843E704:QZT4YaSve2:325301._amzn-wplay._tcp.local. can be reached at 10-0-1-108.local.:53725 (interface 4)
 s=0 at=JG69s/Dch8Tp n=Aman\'s\ Fire\ TV\ stick tr=tcp sp=54118 pv=1 mv=2 v=2 a=0 u=649079E36FF650C95604A3397843E704 ad=A2LWARUGJLBYEW dpv=1 t=8 f=0

and see that "Aman's Fire TV stick" is available on 10.0.1.108:53725

can be reached at 10-0-1-108.local.:53725

Option to stop playback

Hey there, do you know how to stop the playback and return to home screen?

Great work, many thanks for investigation of the protocol!

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.