소스 검색

MacOSX/Framework/VLCMediaPlayer.m: Use the newer form of trigger key for key changes.

Pierre d'Herbemont 17 년 전
부모
커밋
a7d980be46
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      Sources/VLCMediaPlayer.m

+ 5 - 2
Sources/VLCMediaPlayer.m

@@ -124,6 +124,11 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
 
 
 @implementation VLCMediaPlayer
 @implementation VLCMediaPlayer
 
 
+/* Bindings */
++ (id)keysPathsForValuesAffectingPlaying { return [NSSet setWithObject:@"state"]; }
++ (id)keysPathsForValuesAffectingSeekable { return [NSSet setWithObjects:@"state", @"media"]; }
+
+/* Contructor */
 - (id)init
 - (id)init
 {
 {
     return [self initWithDrawable:nil];
     return [self initWithDrawable:nil];
@@ -536,8 +541,6 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
 {
 {
     if (self = [super init])
     if (self = [super init])
     {
     {
-        [VLCMediaPlayer setKeys:[NSArray arrayWithObject:@"state"] triggerChangeNotificationsForDependentKey:@"playing"];
-        [VLCMediaPlayer setKeys:[NSArray arrayWithObjects:@"state", @"media", nil] triggerChangeNotificationsForDependentKey:@"seekable"];
         delegate = nil;
         delegate = nil;
         media = nil;
         media = nil;
         cachedTime = [[VLCTime nullTime] retain];
         cachedTime = [[VLCTime nullTime] retain];