Uploaded image for project: 'MediaPortal 2'
  1. MediaPortal 2
  2. MP2-806

Add skipping and resuming when playing recorded radio

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.2.2
    • 2.2
    • Media
    • None

    Description

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, 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: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, 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: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, 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&nbsp;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: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, 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: &quot;Open Sans&quot;, 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: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; 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: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; {</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; // 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: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; IUIContributorPlayer uicPlayer = player as IUIContributorPlayer;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; if (uicPlayer != null)</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; &nbsp; return uicPlayer.UIContributorType;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; // Return the more specific player types first</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; if (player is IImagePlayer)</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; &nbsp; return typeof(ImagePlayerUIContributor);</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; if (player is IDVDPlayer)</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; &nbsp; return typeof(DVDVideoPlayerUIContributor);</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; // 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: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; if ((player is IVideoPlayer) || (player is IAudioPlayer))</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; &nbsp; return typeof(DefaultVideoPlayerUIContributor);</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; &nbsp; return null;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp; &nbsp; }</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, 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: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, 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: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, 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: &quot;Open Sans&quot;, sans-serif; font-size: 13.6px; background-color: rgb(255, 255, 255);">&nbsp;</div>

      <div data-redactor="1" style="margin: 0px; padding: 0px; color: rgb(39, 42, 52); font-family: &quot;Open Sans&quot;, 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>

      Attachments

        Activity

          People

            HTPCSourcer HTPCSourcer (Inactive)
            nikki Nikki Locke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: