Author Topic: MediaPlayerDriver Template  (Read 2709 times)

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
MediaPlayerDriver Template
« on: July 27, 2014, 06:04:11 am »
The template seems to be missing 6 required interface members. I fixed 3 of them but I can't figure out the last 3.
Can anyone help with these?

Code: [Select]
c:\Windows\Temp\DynamicCompiledElveDrivers\zp3w0--s.0.cs(34,10) : error CS0535: 'BuiltInDrivers.SonosZP' does not implement interface member 'CodecoreTechnologies.Elve.DriverFramework.DriverInterfaces.IMediaPlayerDriver.SetZonePlaylistPosition(CodecoreTechnologies.Elve.DriverFramework.Scripting.ScriptNumber, CodecoreTechnologies.Elve.DriverFramework.Scripting.ScriptNumber)'
c:\Windows\Temp\DynamicCompiledElveDrivers\zp3w0--s.0.cs(34,10) : error CS0535: 'BuiltInDrivers.SonosZP' does not implement interface member 'CodecoreTechnologies.Elve.DriverFramework.DriverInterfaces.IMediaPlayerDriver.GetZonePlaylist(int, int, int)'
c:\Windows\Temp\DynamicCompiledElveDrivers\zp3w0--s.0.cs(34,10) : error CS0535: 'BuiltInDrivers.SonosZP' does not implement interface member 'CodecoreTechnologies.Elve.DriverFramework.DriverInterfaces.IMediaPlayerDriver.SupportsPlaylistIDFromCompanionMediaLibrary'

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: MediaPlayerDriver Template
« Reply #1 on: July 27, 2014, 02:43:10 pm »
When I was messing around with implementing that driver interface, visual studio would error out until all the required member elements were included. What I did was added all the members, but threw a not implemented exception for the ones I didn't need.
Code: [Select]
        Public Sub SetZonePlaylistPosition(zoneID As Scripting.ScriptNumber, index As Scripting.ScriptNumber) _
            Implements IMediaPlayerDriver.SetZonePlaylistPosition
            Throw New NotImplementedException
        End Sub

Code: [Select]
Public ReadOnly Property SupportsPlaylistIDFromCompanionMediaLibrary As Boolean _
        Implements IMediaPlayerDriver.SupportsPlaylistIDFromCompanionMediaLibrary
            Get
                Return False
            End Get
        End Property

I don't see a member 'GetZonePlaylist'. Maybe we are using different elve dlls.
I always wanted to be somebody. In retrospect, I think I should have been more specific.

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: MediaPlayerDriver Template
« Reply #2 on: July 27, 2014, 05:18:16 pm »
Got rid of one.
Code: [Select]
   public bool SupportsPlaylistIDFromCompanionMediaLibrary
       {
           get
   {
return false;
   }
        }

This does nothing
Code: [Select]
       public void SetZonePlaylistPosition(ScriptNumber zoneID, ScriptTimeSpan position)
       {
throw new NotImplementedException();
       }

And the 'GetZonePlaylist'... there's a GetZonePLaylistText
Code: [Select]
   public MediaPlayerPlaylistItem[] GetZonePlaylistText(int zoneID)
       {
       }

But the "GetZonePlaylist' wants a 3rd int. I have no idea what it would be?

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: MediaPlayerDriver Template
« Reply #3 on: July 27, 2014, 06:27:19 pm »
For the SetZonePlaylistPosition change the second variable from ScriptTimeSpan to a ScriptNumber. The position is referring to position in playlist and not position in a song.
Try something like this for the other method:
Code: [Select]
Public Function GetZonePlaylist(zoneNumber As Integer, pageIndex As Integer, pageSize As Integer) As MediaPlayerPlaylistItem() _
            Implements IMediaPlayerDriver.GetZonePlaylist
            Dim a() As MediaPlayerPlaylistItem = Nothing
            Return a
        End Function
I always wanted to be somebody. In retrospect, I think I should have been more specific.

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: MediaPlayerDriver Template
« Reply #4 on: July 29, 2014, 04:48:26 am »
Not having any luck with the 'GetZonePlaylist'.
Can you convert your suggestion to C#?

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: MediaPlayerDriver Template
« Reply #5 on: July 29, 2014, 07:43:54 am »
Code: [Select]
public MediaPlayerPlaylistItem[] GetZonePlaylist(int zoneNumber, int pageIndex, int pageSize)
{
MediaPlayerPlaylistItem[] a = null;
return a;
}

Sent from my SCH-I545 using Tapatalk

I always wanted to be somebody. In retrospect, I think I should have been more specific.

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: MediaPlayerDriver Template
« Reply #6 on: July 30, 2014, 12:48:00 pm »
That's what I had. Didn't work. Tried again, still didn't work.
Started over with a blank template, it worked.
Don't know what I did wrong the first time and don't care!!
Thanks for the help.

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: MediaPlayerDriver Template
« Reply #7 on: July 30, 2014, 01:39:47 pm »
Weird... glad you got it!

Sent from my SCH-I545 using Tapatalk

I always wanted to be somebody. In retrospect, I think I should have been more specific.