Python FBPlayerControl().SetPlaySpeed problem/bug(???)

Python FBPlayerControl().SetPlaySpeed problem/bug(???)

vdebaie
Advocate Advocate
527 Views
1 Reply
Message 1 of 2

Python FBPlayerControl().SetPlaySpeed problem/bug(???)

vdebaie
Advocate
Advocate

i'm trying to learn how to set the Transport play back speed through python - currently having a very strange result.

 

i was able to find the following attributes:

'kFBSpeed_10x', 'kFBSpeed_1_10x', 'kFBSpeed_1_2x', 'kFBSpeed_1_3x', 'kFBSpeed_1_4x', 'kFBSpeed_1_5x', 'kFBSpeed_1x', 'kFBSpeed_2x', 'kFBSpeed_3x', 'kFBSpeed_4x', 'kFBSpeed_5x', 'kFBSpeed_ALL_FR'

 

when i use them i do not get the respected results.

 

for example when i use:

 

FBPlayerControl().SetPlaySpeed(FBTransportPlaySpeed.kFBSpeed_1x)

print FBPlayerControl().GetPlaySpeed()

 

the result i get is my transport speed is set to "kFBSpeed_5x"

 

when i use:

 

FBPlayerControl().SetPlaySpeed(FBTransportPlaySpeed.kFBSpeed_2x)

print FBPlayerControl().GetPlaySpeed()

 

the result i get is my transport speed is set to "kFBSpeed_1x"

 

 

am i using this wrong or is this a bug?

 

thank you.

 

 

 

0 Likes
528 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

The attributes you found (pPlaySpeedMode) refer to the method SetPlaySpeedMode. SetPlaySpeed takes a double (the speed itself).

So when you're sending SetPlaySpeed(FBTransportPlaySpeed.kFBSpeed_1x) , you're actually attempting SetPlaySpeed(5), hence, the "problem" (5 is due to the parameter definition on fbplayercontrol.h; coming from an enumerated list).

 

You can either use SetPlaySpeedMode(FBTransportPlaySpeed.kFBSpeed_1x) or SetPlaySpeed(1).

 

Cheers!

0 Likes