@@ -76,109 +76,16 @@ Item {
77 source: mediaPlayer
77 source: mediaPlayer
78 visible: mediaPlayer && mediaPlayer.playbackState !== MediaPlayer.StoppedState || false
78 visible: mediaPlayer && mediaPlayer.playbackState !== MediaPlayer.StoppedState || false
81−// Loader {
80+ Connections {
82−// id: shaderLoader
81+ target: mediaPlayer
83−// anchors.fill: videoOutput
82+ onError: {
84−// sourceComponent: fixedHeight ? shaderComponent : undefined
83+ if (error !== MediaPlayer.NoError) {
85−
84+ errorTimer.restart();
87−// id: shaderComponent
92−// property variant source: ShaderEffectSource {
93−// sourceItem: videoOutput
95−// sourceRect: Qt.rect(0, 0, units.gu(2), videoOutput.height)
99−// bottom: parent.bottom
102−// width: units.gu(2)
103−// visible: mediaPlayer.playbackState !== MediaPlayer.StoppedState
105−// property real itemOpacity: 0.5
108−// varying highp vec2 qt_TexCoord0;
109−// uniform sampler2D source;
110−// uniform lowp float itemOpacity;
113−// highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
114−// sourceColor *= itemOpacity;
115−// gl_FragColor = sourceColor;
122−// property variant source: ShaderEffectSource {
123−// sourceItem: videoOutput
125−// sourceRect: Qt.rect(units.gu(2), 0, videoOutput.width - units.gu(4), videoOutput.height)
129−// bottom: parent.bottom
130−// left: leftVideo.right
131−// right: rightVideo.left
133−// visible: mediaPlayer.playbackState !== MediaPlayer.StoppedState
135−// property real itemOpacity: 1
138−// varying highp vec2 qt_TexCoord0;
139−// uniform sampler2D source;
140−// uniform lowp float itemOpacity;
143−// highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
144−// sourceColor *= itemOpacity;
145−// gl_FragColor = sourceColor;
152−// property variant source: ShaderEffectSource {
153−// sourceItem: videoOutput
155−// sourceRect: Qt.rect(videoOutput.width - units.gu(2), 0, units.gu(2), videoOutput.height)
159−// bottom: parent.bottom
160−// right: parent.right
162−// width: units.gu(2)
163−// visible: mediaPlayer.playbackState !== MediaPlayer.StoppedState
165−// property real itemOpacity: 0.5
168−// varying highp vec2 qt_TexCoord0;
169−// uniform sampler2D source;
170−// uniform lowp float itemOpacity;
173−// highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
174−// sourceColor *= itemOpacity;
175−// gl_FragColor = sourceColor;
184 Rectangle {
91 Rectangle {
@@ -195,9 +102,9 @@ Item {
195 Behavior on width { UbuntuNumberAnimation {} }
102 Behavior on width { UbuntuNumberAnimation {} }
198− name: "media-playback-start"
199 anchors.fill: parent
105 anchors.fill: parent
200 anchors.margins: units.gu(1)
106 anchors.margins: units.gu(1)
107+ name: errorTimer.running ? "dialog-warning-symbolic" : "media-playback-start"
201 color: "#F3F3E7"
108 color: "#F3F3E7"
@@ -214,9 +121,15 @@ Item {
214 MouseArea {
121 MouseArea {
215 id: contentMouseArea
122 id: contentMouseArea
216 anchors.fill: content
123 anchors.fill: content
124+ enabled: !errorTimer.running
217 hoverEnabled: mediaPlayer && mediaPlayer.playbackState !== MediaPlayer.StoppedState || false
125 hoverEnabled: mediaPlayer && mediaPlayer.playbackState !== MediaPlayer.StoppedState || false
219 onClicked: root.clicked()
127 onClicked: root.clicked()
220 onPositionChanged: root.positionChanged()
128 onPositionChanged: root.positionChanged()