I am trying to set "currentPositionTimecode" using media player 9 but it is
not working.
I have a wmv file, with embedded SMPTE timecode, using a timer object I can
retreive "currentPositionTimecode" sucessfully.
When I try and set it so that it will just go to that timecode, it passes
over the line sucessfully but nothing happens, the file continues to play
and nothing happens.
The other weird thing is that when I type mp1.controls, I do not get
currentpositiontimecode as an option in the dropdown, I get currentposition
and currentpositionstring but not currentpositiontimecode.
I am using Visual Basic 6, below is some code:
Private Sub Command1_Click()
MP1.Controls.currentPositionTimecode = "18:00:13:05"
End Sub
Private Sub Form_Load()
MP1.URL = "\\testmachine\test\PSC-WI0002-003.wmv"
MP1.Controls.currentPositionTimecode = "18:00:13:05"
End Sub
Private Sub Timer1_Timer()
Label1.Caption = MP1.Controls.currentPositionTimecode
End Sub
Any help is greatly appreciated.
thanks
joshua
The currentPositionTimecode property is on the IWMPControls3 interface. I'd
like to point you to this section of the Playe SDK:
http://msdn.microsoft.com/library/en-us/wmplay/mmp_sdk/usingwindowsmediaplay
erwithvisualbasic.asp?frame=true
and ask you to pay particular attention to the part about multiple
interfaces. I think that might just solve your problem.
If that doesn't work, let me know and I'll look into it further.
Thanks,
--
Jim Travis
Microsoft Corp.
Windows Media Player SDK
Please do not send email directly to this alias as this alias is for
newsgroup purposes only. This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. © 2003
Microsoft Corporation. All rights reserved.
"Joshua Anderson" <jo...@mastermind.net.au> wrote in message
news:epq9FgDvCHA.572@TK2MSFTNGP12...
Thanks for your reply, I understand now why I could not see
currentpositiontimecode in the dropdown, and I have modified the code as
follows:
I also understand why I could not set the "currentpositiontimecode" in
form_load, I was just doing this to see if it would work, I am really doing
this on a button when the file is playing or stopped.
I have added media player as a component, and drawn it on my form, and
renamed it to MP1. I assume thats all ok?
Dim controlsObject As IWMPControls3
Private Sub Form_Load()
MP1.URL = "c:\test\PSC-WI0002-003.wmv"
Set controlsObject = MP1.Controls
End Sub
Private Sub Command1_Click()
controlsObject.currentPositionTimecode = "18:00:13:05"
End Sub
Private Sub Timer1_Timer()
Label1.Caption = controlsObject.currentPositionTimecode
End Sub
I have tried stopping the player before going to the timecode, pausing etc
nothing works.
Thanks
josh
"Jim Travis [ms]" <jtr...@online.microsoft.com> wrote in message
news:OwRZW0DvCHA.2476@TK2MSFTNGP10...
for anyone interested, her is how you do it:
currentPositionTimecode = "[00000]18:00:12.23"
I am not sure why you need "[00000]" but you do.
Also the frames has to be put in with a decimal place not a colon.
Hope that helps someone!
"Joshua Anderson" <jo...@mastermind.net.au> wrote in message
news:#c3B8GEvCHA.2296@TK2MSFTNGP10...
--
Jim Travis
Microsoft Corp.
Windows Media Player SDK
Please do not send email directly to this alias as this alias is for
newsgroup purposes only. This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. © 2003
Microsoft Corporation. All rights reserved.
"Joshua Anderson" <jo...@mastermind.net.au> wrote in message
news:u1OSCxEvCHA.1656@TK2MSFTNGP09...
Hope that clears it up.
--
Jim Travis
Microsoft Corp.
Windows Media Player SDK
Please do not send email directly to this alias as this alias is for
newsgroup purposes only. This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. © 2003
Microsoft Corporation. All rights reserved.
"Joshua Anderson" <jo...@mastermind.net.au> wrote in message
news:u1OSCxEvCHA.1656@TK2MSFTNGP09...
I will look into that, because thats a problem we are having, I will look
into that, would be great to have discontinuous timecode in a single wmv
file, that is exactly what I was wanting to do!
thanks again
Joshua
"Jim Travis [ms]" <jtr...@online.microsoft.com> wrote in message
news:ejS2R0MvCHA.2060@TK2MSFTNGP11...