Home of the Squeezebox™ & Transporter® network music players.
Page 75 of 75 FirstFirst ... 2565737475
Results 741 to 746 of 746
  1. #741
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,027
    I'm not suggesting that the player necessarily has to be permanently visible.
    I use Philippe's bridge for UPnP.
    I have it set so that the LMS player only appears when the UPnP device is switched on and has been detected.
    I know that play cannot be initiated from outside of the Alexa voice command/skill (not 100% true but near enough - e.g. some are using web commands to make Alexa perform text to speech functions).

    However, today, the bridge maintains its own list of detected devices and they can be configured within the constraints of the plugin (not as an LMS player).
    Perhaps no per device configuration will be required within the bridge since so little can be adjusted from outside however, I was describing ways that things could work like the other bridges do it already.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  2. #742
    Senior Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    415
    Quote Originally Posted by Paul Webster
    I'm not suggesting that the player necessarily has to be permanently visible.
    I use Philippe's bridge for UPnP.
    I have it set so that the LMS player only appears when the UPnP device is switched on and has been detected.
    I know that play cannot be initiated from outside of the Alexa voice command/skill (not 100% true but near enough - e.g. some are using web commands to make Alexa perform text to speech functions).

    However, today, the bridge maintains its own list of detected devices and they can be configured within the constraints of the plugin (not as an LMS player).
    Perhaps no per device configuration will be required within the bridge since so little can be adjusted from outside however, I was describing ways that things could work like the other bridges do it already.
    Good that you mention the Loetzimmer TTS shell script documented at https://blog.loetzimmer.de/2017/10/a...hell-echo.html and also https://github.com/walthowd/ha-alexa-tts which I use extensively at home for TTS. It is capable of retrieving Echo names via its -a switch by performing a login to the user's Amazon account. The bridge could be configured to do likewise and retrieve such info for the LMS user outside the skill to configure the bridge.

  3. #743
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,148
    so, reading your comments it seems to me that if you don't really want to have the players always there as they cannot be started from LMS, then using the stream.mp3 url and controlling flow right in Perl might be the fastest option.

    I think the regulation can happen in a player class that calls Slim::Player::Source::nextChunk. That method is called by Slim::Player::Client which is the base class of all players. I probably can create a new player class (if we want thing to be isolated from core LMS).

    But to start with, if you can run LMS from the Perl source that would be easier. I would then simply add an option to the URI like http://<lms>:9000/stream.mp3&throttle and put throttling directly inside LMS to see if it works for you
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

  4. #744
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,148
    ok, having a better look at the code, the web player is Slim::Player::HTTP.pm and by just modifying this per attachment, you can throttle it. This file below is just a dirty hack and not a proper base (especially it does not send an initial burst, so the player has to do buffering itself, so starving will likely happen anyway, plus it applies to all web players...) but it gives you an idea where things can be. Let me know what you think.

    You can look at Slim::Web::HTTP.pm (#784) to know when a client is created purely out of an HTTP request.
    Attached Files Attached Files
    Last edited by philippe_44; 2020-10-14 at 23:00.
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

  5. #745
    Senior Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    415
    Thanks @philippe. I created a test install of logitechmediaserver_8.0.0_1602603940_amd64.deb on my Ubuntu box and replaced the file HTTP.pm in /usr/share/perl5/Slim/Player by your modified file. In a test version of the skill, I added &throttle to the stream's URL.

    What happens is that playback on the Echo starts and stops every ~10 seconds, probably due to rebuffering so the Echo does not like too much starvation. During the periods that music is actually playing, selecting next in iPeng does move to the next track quickly, so that's promising for sure !

    If you PM me your Amazon account email then I can send you a beta invite to the test skill so that you can play with it yourself. I'll strip out the subscription code as that won't work for you in the en-CA Amazon store (assuming that's where you have your Amazon account).

  6. #746
    Senior Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    415
    The logs show that Amazon sends the skill the AudioPlayer.PlaybackNearlyFinished every ~23 seconds or so, which appears to be how long the buffer is lasting with an Echo Dot 3. Same for an Echo Show 2 so it does not seem to depend on the hardware of the Echo itself. The Show displays a dotted-line bar at the bottom of the screen to indicate buffering.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •