WTH there's no option to play a stream for a specified time in media_player.play_media

I wish there would be an option to play a media only for a set length of time using media_player.
Of course, it is possible to use a delay and then stop the stream manually, but this will not work with announcements.
With announcements, the media_player resumes playing previous playlist once the new media finishes. Unfortunately with streams (like casting camera entity) the stream never finishes, therefore the player will never return to the previous playlist.