GithubHelp home page GithubHelp logo

clzola / totem-remote-http Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.26 MB

HTTP interface for controlling video stream.

License: GNU General Public License v3.0

Python 2.40% HTML 3.88% CSS 32.14% JavaScript 61.59%

totem-remote-http's Introduction

TotemRemoteHttp

Providing HTTP interface for controlling totem video player. It has web interface at http://localhost:9090/interface. You can find list of API calls bellow.

Web Interface API Interface

Instalation

Download this repository and move the TotemRemoteHttp directory to:

~/.local/share/totem/plugins/

and then you can enable it in Edit โ†’ Preferences โ†’ Plugins, find Totem Remote HTTP and tick checkbox.

Usage

Plugin creates http server and currently listens to port 9090. I am planing to create some sort of window for configuring this port. There are serveral actions that can be performed.

http://localhost:9090/status

Example

Request:

GET http://localhost:9090/status

Response:

{
    "current_time": 1635054, 
    "display_name": "Exodus.Gods.and.Kings.2014.1080p.3D.HSBS.BluRay.x264.YIFY.mp4", 
    "fullscreen": false, 
    "state": true, 
    "volume": 0.19999694824218753, 
    "stream_length": 9019156
}

API

  • Web Interface
  • API Interface
  • Status
  • OpenSubtitles Hash
  • Volume
  • Forward
  • Backward
  • Seek
  • Toggle Fullscreen
  • Next Video/Chapter
  • Previous Video/Chapter
  • Play/Pause
  • Remote

Web Interface

Shows some nice interface for controling video stream.

Route:

GET http://[ip_address]:9090/
GET http://[ip_address]:9090/interface

API Interface

Shows player API interface for testing.

Route:

GET http://[ip_address]:9090/api

Status

Retrieves status of currently playing video.

Route:

GET http://[ip_address]:9090/staus

OpenSubtitles Hash

Computes hash of currently playing video. This hash can be used to search subtitles at opensubtitles.org

Route:

GET http://[ip_address]:9090/hash
Volume

Sets new volume value.

Route:

POST http://[ip_address]:9090/volume/{value}
Parameter Type Location Description
value float route Must be between 0 and 1

Forward

Moves forward through video stream by 60 seconds.

Route:

POST http://[ip_address]:9090/forward

Backward

Moves backward through video stream by 15 seconds.

Route:

POST http://[ip_address]:9090/backward

Seek

Positions at exact location of video stream from beginning.

Route:

POST http://[ip_address]:9090/seek/{time}
Parameter Type Location Description
time long route Location in video stream in milliseconds from begining of video stream

Toggle Fullscreen

Toggles fullscreen mode.

Route:

POST http://[ip_address]:9090/toggle/fullscreen

Next Video/Chapter

Play the next playlist item or next chapter.

Route:

POST http://[ip_address]:9090/playlist/next

Previous Video/Chapter

Play the previous playlist item or previous chapter.

Route:

POST http://[ip_address]:9090/playlist/previous

Play/Pause

Toggle play/pause on the current stream.

Route:

POST http://[ip_address]:9090/playpause

Remote

Executes the specified command on instance of Totem.

Route:

POST http://[ip_address]:9090/remote/{command}
Parameter Type Location Description
command string route Name of command

Available commands:

  • PLAY
  • PAUSE
  • STOP
  • PLAYPAUSE
  • NEXT
  • PREVIOUS
  • SEEK_FORWARD
  • SEEK_BACKWARD
  • VOLUME_IP
  • VOLUME_DOWN
  • FULLSCREEN
  • QUIT
  • ENQUEUE
  • REPLACE
  • SHOW
  • UP
  • DOWN
  • LEFT
  • RIGHT
  • SELECT
  • DVD_MENU
  • ZOOM_UP
  • ZOOM_DOWN
  • EJECT
  • PLAY_DVD
  • MUTE
  • TOGGLE_ASPECT

totem-remote-http's People

Contributors

clzola avatar

Watchers

 avatar  avatar

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.