Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This looks like a bug that was introduced in OS X Mountain Lion 10.8 (<strong>Edit:</strong> there are also reports on OS X 10.7, see comments below) . I guess that <code>QTMovieView</code> will get deprecated in one of the next major OS X releases. The best solution is to move to AV Foundation (<code>AVPlayer</code> and the corresponding <code>AVPlayerLayer</code> class). Apple has some <a href="http://developer.apple.com/library/mac/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/02_Playback.html" rel="nofollow">documentation about playing back assets using this framework</a>.</p> <p>That said, if you can’t update to AV Foundation or you can’t turn off <em>Auto Layout</em>, you still can fix this issue by adding the missing methods dynamically during runtime to the <code>StdMovieUISliderCell</code> class. Make sure to add the Objective C runtime header file and to add the methods as early as possible (e.g. <code>+ (void)load</code> in your application delegate). For App Store static analyzer rejection foo reasons, it’s also safe to add some simple encoding to the class name like rot13.</p> <pre><code>// Make sure that we have the right headers. #import &lt;objc/runtime.h&gt; // The selectors should be recognized by class_addMethod(). @interface NSObject (SliderCellBugFix) - (NSSliderType)sliderType; - (NSInteger)numberOfTickMarks; @end // Add C implementations of missing methods that we’ll add // to the StdMovieUISliderCell class later. static NSSliderType SliderType(id self, SEL _cmd) { return NSLinearSlider; } static NSInteger NumberOfTickMarks(id self, SEL _cmd) { return 0; } // rot13, just to be extra safe. static NSString *ResolveName(NSString *aName) { const char *_string = [aName cStringUsingEncoding:NSASCIIStringEncoding]; NSUInteger stringLength = [aName length]; char newString[stringLength+1]; NSUInteger x; for(x = 0; x &lt; stringLength; x++) { unsigned int aCharacter = _string[x]; if( 0x40 &lt; aCharacter &amp;&amp; aCharacter &lt; 0x5B ) // A - Z newString[x] = (((aCharacter - 0x41) + 0x0D) % 0x1A) + 0x41; else if( 0x60 &lt; aCharacter &amp;&amp; aCharacter &lt; 0x7B ) // a-z newString[x] = (((aCharacter - 0x61) + 0x0D) % 0x1A) + 0x61; else // Not an alpha character newString[x] = aCharacter; } newString[x] = '\0'; return [NSString stringWithCString:newString encoding:NSASCIIStringEncoding]; } // Add both methods if they aren’t already there. This should makes this // code safe, even if Apple decides to implement the methods later on. + (void)load { Class MovieSliderCell = NSClassFromString(ResolveName(@"FgqZbivrHVFyvqrePryy")); if (!class_getInstanceMethod(MovieSliderCell, @selector(sliderType))) { const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(NSSliderType), @encode(id), @encode(SEL)] UTF8String]; class_addMethod(MovieSliderCell, @selector(sliderType), (IMP)SliderType, types); } if (!class_getInstanceMethod(MovieSliderCell, @selector(numberOfTickMarks))) { const char *types = [[NSString stringWithFormat: @"%s%s%s", @encode(NSInteger), @encode(id), @encode(SEL)] UTF8String]; class_addMethod(MovieSliderCell, @selector(numberOfTickMarks), (IMP)NumberOfTickMarks, types); } } </code></pre> <p>I made two assumptions while implementing both methods:</p> <ol> <li>A movie view can only have a linear slider, not a circular one.</li> <li>A movie view won’t have tick marks.</li> </ol> <p>The latter could be a problem if your movie has chapters, but I don’t know how they are handled, because I don’t need or use them.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload