API - Play from beginning?

Question about the API. I can play a recording using this CURL command:
/api/play/recording/{recording_id}

But if the recording was previously partially watched, I am asked if I want to resume or play from the beginning. Is there an API call I can use to always play a recording from the beginning?

There is not. We can look at handling this though in the future.

2 Likes

Hi @maddox! Just wondering if this is something that might be on your plate?

1 Like

Hi @maddox! Just wondering if there is any hope for this request? Here's why: I am using Home Assistant to play random scary ghost/zombie videos in a window for Halloween. Each time it starts a video, it needs to play from the beginning; not from where it left off last time. I can do it in Plex, but it is ugly and unreliable. Channels would be way better! Help a Halloween nerd out!

What client device?

It would be an Apple TV

I can look at this. Thanks for the feedback. This was on a long list already.

1 Like

Thanks @maddox and @tmm1!

What about something like POST /api/position/0?

It’ll look more like a resume option on the post. So while it defaults to auto resuming, we’ll give an option to not resume via a query parameter on the url.

1 Like

@maddox No rush, but out of curiosity - What do you imagine the timeline would be for this change to be implemented?

After looking at it, it’s actually way trickier than I was thinking. So it won’t be soon.

You know what I always say - It's tricky to rock a rhyme. To rock a rhyme, that's right on time.

1 Like

I get that this request may take some time, and I really do appreciate all of the hard work that you guys put into Channels. But I do want to point out one thing: You literally mentioned ghosts on the API page, so we clearly need this to work for my Halloween projector automation! :slight_smile:

@tmm1 @maddox Is there a way to skip (or reduce the time of) the onscreen display that shows the name of the video that is starting to play?

Have you tried Settings > Playback > Seek Options?

Good suggestion @racameron. I see there is a Show Timeline option, but I think that only works when doing a quick seek. I suppose if I start the video and then immediately do a seek back (which I plan to do anyway) it will still display momentarily but then will hopefully disappear as soon as I do the seek back. I'll give it a try later and see how it goes!

You are correct. (I just did a test, and the timeline will still briefly display upon first starting playback, and when paused; this setting only applies when seeking.)

Can you use a virtual channel to play the video in a loop?

That is a good suggestion, but it is part of a larger automation that runs every 10 minutes. It randomly selects a video to play, changes lighting, and disables the animatronics while the video plays. Because the last thing you want is a zombie to start screaming in the middle of a ghost video. :slight_smile: