if (reallyStopped) return;
// go!
+ qDebug() << "Playing" << streamUrl.toString();
mediaObject->setCurrentSource(streamUrl);
mediaObject->play();
}
void MediaView::currentSourceChanged(const Phonon::MediaSource source) {
- qDebug() << "Playing" << source.url().toString();
+
}
void MediaView::skipVideo() {
QSettings settings;
QString definitionName = settings.value("definition").toString();
int definitionCode = VideoDefinition::getDefinitionCode(definitionName);
- if (definitionCode == 34) {
+ if (definitionCode == 18) {
// This is assumed always available
- foundVideoUrl(videoToken, 34);
+ foundVideoUrl(videoToken, 18);
} else {
findVideoUrl(definitionCode);
}
QSettings settings;
QString definitionName = settings.value("definition").toString();
int definitionCode = VideoDefinition::getDefinitionCode(definitionName);
- if (definitionCode == 34) {
+ if (definitionCode == 18) {
// This is assumed always available
- foundVideoUrl(videoToken, 34);
+ foundVideoUrl(videoToken, 18);
} else {
findVideoUrl(definitionCode);
}
QString nextDefinitionName = definitionNames.at(previousIndex);
findVideoUrl(nextDefinitionName);
} else {
- foundVideoUrl(videoToken, 34);
+ foundVideoUrl(videoToken, 18);
}*/
if (currentIndex > 0) {
previousIndex = currentIndex - 1;
int definitionCode = definitionCodes.at(previousIndex);
- if (definitionCode == 34) {
+ if (definitionCode == 18) {
// This is assumed always available
- foundVideoUrl(videoToken, 34);
+ foundVideoUrl(videoToken, 18);
} else {
findVideoUrl(definitionCode);
}
} else {
- foundVideoUrl(videoToken, 34);
+ foundVideoUrl(videoToken, 18);
}
}
}
QList<int> VideoDefinition::getDefinitionCodes() {
- static QList<int> definitionCodes = QList<int>() << 34 << 22 << 37;
+ static QList<int> definitionCodes = QList<int>() << 18 << 22 << 37;
return definitionCodes;
}
QHash<QString, int> VideoDefinition::getDefinitions() {
static QHash<QString, int> definitions;
if (definitions.isEmpty()) {
- definitions.insert("360p", 34);
+ definitions.insert("360p", 18);
definitions.insert("720p", 22);
definitions.insert("1080p", 37);
}