locked
Some question about PlayTo.

    Question

  • Hi all,

    [Environment]
    Computer p1 play video file to Computer p2

    [Questions]
    Q1. Can control p2's playback rate by p1?
    Q2. How to know p1 have connect with other device?

    [Detail for Q2]
    Because I have playto on p2
    So, I will see p2 device status is "Now playing" when open p1's Devices charm.

    I know that I can use PlayToConnection to get PlayToConnectionState.
    But, this class is depend on MediaElement control.
    If Change the page in my app, p1's Devices charm is also show that p2 device status is "Now playing"
    But I don't have MediaElement control.
    So I can't use PlayToConnection to get PlayToConnectionState.

    Thanks

    Tuesday, July 03, 2012 11:33 AM

Answers

  • Sorry for the delay, my MSDN Forum Search RSS feed can be slow sometimes in groveling the questions.

    1: If the destination supports multiple playback rates then rate changing will work. I am assuming that you are using the PlayTo Receiver on Computer 2 which only supports a playback rate of 1. However there are other DMRs that do support multiple playback rates and you can change the playback rate on those devices.

    2: Programically you can use the PlayToConnectionState to determine if you are connected to the device or not and if it is rendering (playing) or not. As you said you cannot use the PlayToConnectionState you cannot access this information. You talked about changing the page, if there is a media element on the new page I believe it should transfer the play to connection to that new element and you should get the status from that element.

    -- David



    Tuesday, July 17, 2012 2:29 PM

All replies

  • Hello,

    For question one, you can follow this document
    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj152728.aspx

    About the second question, you should add the Play to Target

    To run the application, you need a target device to which Play To can stream media. If you do not have a certified Play To receiver, you can use Windows Media Player as a target device. To use Windows Media Player as a target device, your computer must be connected to a private network.

    1. Start Windows Media Player.
    2. Expand the Stream menu and enable the Allow remote control of my Player... option. Leave Windows Media Player open, because it must be running to be available as a Play To target.
    3. Open the Devices and Printers control panel. Click Add devices and printers. In the Add devices and printers wizard, in the Choose a device or printer to add to this PC window, locate the Digital media renderer for your PC. This is the Windows Media Player for your PC. Select it and click Next. When the wizard finishes, you will see your instance of Windows Media Player in the list of Multimedia Devices.

    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh465191.aspx

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, July 04, 2012 7:12 AM
  • Sorry, my English isn't good.

    I have upload a simple sample to describe my question.
    https://skydrive.live.com/?cid=05e72b03c01b3245&resid=5E72B03C01B3245!264&id=5E72B03C01B3245%21264

    [Environment Description]
    Two page:
    GroupedItemsPage -> show the Videos Library's video file by ListView
    ItemDetailPage -> MediaElement

    When user select the video file in GroupedItemsPage,
    it will navigate to ItemDetailPage and play this video file by MediaElement
    Can control MediaElement by "play","pause","+rate" button

    [Reproduce step]
    1. prepare two PC(p1, p2)
    2. Launch app in p1, and select video file
    3. open device charm and select p2 is playto target device
    4. Now, the video will show on p2 screen. P1 is black screen
    5. click "+rate" button, but p2's playback doesn't increase   <----------Question 1
    5. p1 click Goback button to GroupedItemsPage 
    6. Open Deivce charm, it will see the p2 is connecting and show "Now playing"
    ---Is there any method can get this information by coding?   <----------Question 2
    ---PS: information is mean "p1 have connect with p2"

    [Questions]
    1. Can control p2's playback rate by p1
    2. How to know p1 have connect with other device?

    Thanks

    Wednesday, July 04, 2012 11:26 AM
  • Sorry,

    Is anyone here?

    Thanks

    Tuesday, July 10, 2012 2:30 AM
  • Sorry for the delay, my MSDN Forum Search RSS feed can be slow sometimes in groveling the questions.

    1: If the destination supports multiple playback rates then rate changing will work. I am assuming that you are using the PlayTo Receiver on Computer 2 which only supports a playback rate of 1. However there are other DMRs that do support multiple playback rates and you can change the playback rate on those devices.

    2: Programically you can use the PlayToConnectionState to determine if you are connected to the device or not and if it is rendering (playing) or not. As you said you cannot use the PlayToConnectionState you cannot access this information. You talked about changing the page, if there is a media element on the new page I believe it should transfer the play to connection to that new element and you should get the status from that element.

    -- David



    Tuesday, July 17, 2012 2:29 PM
  • Could I change the  PlayToConnectionState programically?

    My app has two page:

    FilesViewPage -> show media files (videos, music, pictures) by ListView
    PlayingPage -> MediaElement

     When I select a media file in FilesViewPage, it will navigate to the PlayingPage.

    Then I can play it to a remote device throught the charm bar.

    When I click the goback button to the FilesViewPage, the connection is still on and will show "Now Playing" on the charm bar.

    ---->  Is there any way to disconnect the PlayToConnection ?

    I want it show "This app can't send to other devices right now" on the charm bar after go back to the filesViewPage.

    Friday, August 10, 2012 6:39 AM