Skip to content

Casting

AAK edited this page Jun 30, 2018 · 7 revisions

PC To PC Casting

  • PC To PC casting, in the context of kawaii-player means, ability to cast (send) videos or playlist from one computer to another computer. This feature has been implemented by following master-slave design. In this design, one PC running kawaii-player will be assigned as Master, while another PC will be assigned as slave.

  • Master can send audio/video/playlist and other playback commands to slave. Slave can only receive, play and execute playback commands as given by master.

  • It is complete cross-platform solution, and one can cast videos from GNU/Linux box to Windows box or vice-versa (or any other OS on which kawaii-player can be installed)

  • Following are important aspects of this feature:

    • Casting single file or entire playlist from one computer (Master)

      to another computer (Slave) running kawaii-player.

    • Automatic loading of subtitle (if subtitle name matches the file name)

    • Ability to send external subtitle file from master to slave

    • Ability to queue items

    • Ability to open web interface of slave from internal browser of master,

      which contains multiple other options to control playback activity on slave.

How to enable PC-To-PC casting feature?

* Install kawaii-player on two computers say master and slave.

* On master, enable master mode: Preferences->Other->PC To PC Casting->Master.

* On Slave, enable slave mode: Preferences->Other->PC To PC Casting->Slave

* On Slave, enable remote control: Preferences->Media Server->Turn On Remote Control

* Start media server on both.

* Select any playlist of master. From its contextmenu, start casting files
  
  or playlist from master to slave. Users only need to setup slave address,
  
  when it is prompted by the application, or they can change slave address
  
  from contextmenu itself.

After following above steps, on Master, users will find new contextmenu as shown below from which they can cast items to other Slave computers running kawaii-player.

casting-menu

Above contextmenu has 'Show More Controls' option. This option will open up web interface of slave within master using internal browser. It will allow master to control other playback activities on slave. Following is a screenshot with qtwebengine as browser backend. If internal browser is not working as expected (most probably with qtwebkit backend) then users can open up web interface of slave using any external browser of choice.

Remote-Control

For more details on PC-To-PC casting feature, refer this issue

From v3.6 onwards, kawaii-player will contain a separate slave control box, so that users don't have to open up web interface. Control box can be found at 'Preferences->Slave'.

  • From v3.7 onwards, master can discover ip address of slave automatically.

    If slave is broadcasting itself in the local network, click
    
    'Discover Slaves' option available in the 'PC To PC Casting' 
    
    contextmenu. Discovered slave ip addresses will be available
    
    in the same contextmenu.
    
    For enabling broadcast functionality on slave,
    
    follow Preferences->Media Server->Broadcast Server.
    
  • From v3.7 onwards, it is possible to utilize all controls available in the Extra Toolbar of Master to control the slave. Just toggle Master/Slave button available in the Extra Toolbar to Slave and start controlling advance playback activities on Slave.

slave_control_tab

  • In above screenshot, slave control tab is shown to the left. Extra Toolbar shown to the right contains Master/Slave Toggle button at its top right corner, which allows toggling playback control between master and slave.

Browser to PC Casting

The computer running kawaii-player can be used as youtube-casting or torrent-casting device. Users can directly send youtube video/playlist links using web interface to the application with the help of text commands mentioned in the Using Web Interface section, which will be then played using mpv/mplayer and youtube-dl. If the computer running the application is connected to TV then user can directly view the content on TV. Same is with torrent http/magnet links. Users can preserve everything which has been played into local playlist. Users need to enable remote-control mode to use these features, without which everything you click might start playing in the browser if it's html5 compatible. The playing instance can be easily controlled using web-based remote.

Explanation for some casting commands:

  • yt: command: First users have to select some playlist using web interface and then this command will send some url which will be then saved to that playlist. Users then have to click on the playlist entry manually to make it play on the server.

  • torrent: command: First select Torrent section from web interface, then this command will send torrent http/magnet link to the application. Users then have to go to Torrent->History section and click on the required item to make it start playing.

  • ytq: command: (Available in version 2.8+ onwards) Users can send any ytdl supported link/direct link or torrent magnet/http link to the application, which will be then played instantly without asking anything.

About casting extensions:

Experimental casting extension is available for both firefox and chromium here. This extension will add icon and context menu for casting to kawaii-player. Users just have to setup server ip address initially by clicking on the extension icon. After that users are free to go anywhere on the web and then they can cast supported links (including torrent magnet links) directly to the kawaii-player using either context menu or top icon. Therefore, users don’t have to enter text commands manually for casting. Playback of the video can be controlled using web interface.