Skip to content

Commit b9e3bf5

Browse files
committed
Merge branch 'bugfix-13119' into develop
2 parents 5164160 + 1fbc708 commit b9e3bf5

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

docs/notes/feature-avfoundation_player.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ You can also query the **status** property of the player. This property can take
1818
- **playing**
1919
- **paused**
2020

21+
A new message is added to the player:
22+
- The **playRateChanged** message is sent to the player when the rate is changed by the rate scrollbar controller. To enable the rate scrollbar controller, hold shift + click on scrubForward/scrubBack buttons of the player controller.
23+
2124
Note AVFoundation player is supported in OSX 10.8 and above. On systems running OSX 10.6 and 10.7, LiveCode continues to provide player functionality using the QTKit API.

engine/src/mcstring.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ MCNameRef MCM_open_stack;
305305
MCNameRef MCM_option_key_down;
306306
MCNameRef MCM_paste_key;
307307
MCNameRef MCM_play_paused;
308+
MCNameRef MCM_play_rate_changed;
308309
MCNameRef MCM_play_started;
309310
MCNameRef MCM_play_stopped;
310311
MCNameRef MCM_post_url;
@@ -590,6 +591,7 @@ void MCU_initialize_names(void)
590591
/* UNCHECKED */ MCNameCreateWithCString("optionKeyDown", MCM_option_key_down);
591592
/* UNCHECKED */ MCNameCreateWithCString("pasteKey", MCM_paste_key);
592593
/* UNCHECKED */ MCNameCreateWithCString("playPaused", MCM_play_paused);
594+
/* UNCHECKED */ MCNameCreateWithCString("playRateChanged", MCM_play_rate_changed);
593595
/* UNCHECKED */ MCNameCreateWithCString("playStarted", MCM_play_started);
594596
/* UNCHECKED */ MCNameCreateWithCString("playStopped", MCM_play_stopped);
595597
/* UNCHECKED */ MCNameCreateWithCString("postURL", MCM_post_url);
@@ -875,6 +877,7 @@ void MCU_finalize_names(void)
875877
MCNameDelete(MCM_option_key_down);
876878
MCNameDelete(MCM_paste_key);
877879
MCNameDelete(MCM_play_paused);
880+
MCNameDelete(MCM_play_rate_changed);
878881
MCNameDelete(MCM_play_started);
879882
MCNameDelete(MCM_play_stopped);
880883
MCNameDelete(MCM_post_url);

engine/src/mcstring.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ extern MCNameRef MCM_open_stack;
258258
extern MCNameRef MCM_option_key_down;
259259
extern MCNameRef MCM_paste_key;
260260
extern MCNameRef MCM_play_paused;
261+
extern MCNameRef MCM_play_rate_changed;
261262
extern MCNameRef MCM_play_started;
262263
extern MCNameRef MCM_play_stopped;
263264
extern MCNameRef MCM_post_url;

engine/src/player-platform.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ class MCPlayerRatePopup: public MCStack
517517
m_font = nil;
518518

519519
m_player = nil;
520+
m_grabbed_part = -1;
520521
}
521522

522523
~MCPlayerRatePopup(void)
@@ -732,6 +733,9 @@ class MCPlayerRatePopup: public MCStack
732733

733734
Boolean mup(uint2 which, bool release)
734735
{
736+
// PM-2014-09-30: [[ Bug 13119 ]] Make sure a playRateChanged message is sent when the mouse is up/released, but not when creating the ratepopup
737+
if (m_grabbed_part != -1)
738+
m_player -> timer(MCM_play_rate_changed,nil);
735739
m_grabbed_part = kMCPlayerControllerPartUnknown;
736740
return True;
737741
}

0 commit comments

Comments
 (0)