Pergunta

how to seek using VLC??

The demo code as flowing doesn't work either.

/* we need to limit the number of events sent by the slider, since otherwise, the user * wouldn't see the I-frames when seeking on current mobile devices. This isn't a problem * within the Simulator, but especially on older ARMv7 devices, it's clearly noticeable. */

[self performSelector:@selector(_setPositionForReal) withObject:nil afterDelay:0.3];

VLCTime *newPosition = [VLCTime timeWithInt:(int)(_positionSlider.value * self.mediaItem.duration.intValue)];

[self.timeDisplay setTitle:newPosition.stringValue forState:UIControlStateNormal];

self.timeDisplay.accessibilityLabel = [NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"PLAYBACK_POSITION", @""), newPosition.stringValue];

_positionSet = NO;
[self _resetIdleTimer];
Foi útil?

Solução

Check the _setPositionForReal selector on the object where you got that snap from. It will show you how to seek correctly.

The code you posted is only part of the solution to reduce the number of events triggered by the seek slider since libvlc can respond well to them, but current iOS devices are a tad to slow to adapt in a pleasing way.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top