Description
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">If I record a radio program, it appears on the list of TV recordings.</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">However, if I play it, I cannot skip forward to the beginning of the actual program, I have to listen to 5 or more minutes of the previous program (and, if I ever recorded a commercial station, advertisements).</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">This is because the program is played with LiveRadioPlayer, which is an IAudioPlayer, and the code in VideoPlayerModel which determines the IPlayerUIContributor (which then determines which Screen is shown) returns null for IAudioPlayers.</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">I propose the following fix:</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">[CODE]</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> protected override Type GetPlayerUIContributorType(IPlayer player, MediaWorkflowStateType stateType)</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> {</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> // First check if the player provides an own UI contributor.</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> IUIContributorPlayer uicPlayer = player as IUIContributorPlayer;</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> if (uicPlayer != null)</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> return uicPlayer.UIContributorType;</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> // Return the more specific player types first</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> if (player is IImagePlayer)</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> return typeof(ImagePlayerUIContributor);</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> if (player is IDVDPlayer)</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> return typeof(DVDVideoPlayerUIContributor);</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> // Show TV playing screen for both TV and Radio</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> if ((player is IVideoPlayer) || (player is IAudioPlayer))</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> return typeof(DefaultVideoPlayerUIContributor);</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> return null;</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> }</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">[/CODE]</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">However, it might be even better to have a special screen for radio programs - perhaps it could display information about the program? Not sure exactly how I would go about doing that, though.</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">I saw somewhere someone suggesting that radio and TV should be kept separate (which is presumably a major reworking), and I don't want to go to a lot of trouble if all this is going to change at some point in the future.</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">Note: I did have a radio program on a server local disk (i.e. not a network share). Then, if I tried to play it from a remote client, the LiveRadioPlayer couldn't play it directly (it was a server resource, but not accessible from the client). Then playback was taken over by a TsVideoPlayer, which displayed the video playing screen.</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">However, if I play it, I cannot skip forward to the beginning of the actual program, I have to listen to 5 or more minutes of the previous program (and, if I ever recorded a commercial station, advertisements).</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">This is because the program is played with LiveRadioPlayer, which is an IAudioPlayer, and the code in VideoPlayerModel which determines the IPlayerUIContributor (which then determines which Screen is shown) returns null for IAudioPlayers.</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">I propose the following fix:</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">[CODE]</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> protected override Type GetPlayerUIContributorType(IPlayer player, MediaWorkflowStateType stateType)</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> {</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> // First check if the player provides an own UI contributor.</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> IUIContributorPlayer uicPlayer = player as IUIContributorPlayer;</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> if (uicPlayer != null)</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> return uicPlayer.UIContributorType;</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> // Return the more specific player types first</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> if (player is IImagePlayer)</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> return typeof(ImagePlayerUIContributor);</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> if (player is IDVDPlayer)</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> return typeof(DVDVideoPlayerUIContributor);</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> // Show TV playing screen for both TV and Radio</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> if ((player is IVideoPlayer) || (player is IAudioPlayer))</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> return typeof(DefaultVideoPlayerUIContributor);</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> return null;</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> }</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">[/CODE]</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">However, it might be even better to have a special screen for radio programs - perhaps it could display information about the program? Not sure exactly how I would go about doing that, though.</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">I saw somewhere someone suggesting that radio and TV should be kept separate (which is presumably a major reworking), and I don't want to go to a lot of trouble if all this is going to change at some point in the future.</div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);"> </div>
<div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: "Open Sans", sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">Note: I did have a radio program on a server local disk (i.e. not a network share). Then, if I tried to play it from a remote client, the LiveRadioPlayer couldn't play it directly (it was a server resource, but not accessible from the client). Then playback was taken over by a TsVideoPlayer, which displayed the video playing screen.</div>