@@ -76,109 +76,16 @@ Item {
7676
7777 source: mediaPlayer
7878 visible: mediaPlayer && mediaPlayer.playbackState !== MediaPlayer.StoppedState || false
79− }
8079
81−// Loader {
82−// id: shaderLoader
83−// anchors.fill: videoOutput
84−// sourceComponent: fixedHeight ? shaderComponent : undefined
85−
86−// Component {
87−// id: shaderComponent
88−
89−// Item {
90−// ShaderEffect {
91−// id: leftVideo
92−// property variant source: ShaderEffectSource {
93−// sourceItem: videoOutput
94−// hideSource: true
95−// sourceRect: Qt.rect(0, 0, units.gu(2), videoOutput.height)
96−// }
97−// anchors {
98−// top: parent.top
99−// bottom: parent.bottom
100−// left: parent.left
101−// }
102−// width: units.gu(2)
103−// visible: mediaPlayer.playbackState !== MediaPlayer.StoppedState
104−
105−// property real itemOpacity: 0.5
106−
107−// fragmentShader: "
108−// varying highp vec2 qt_TexCoord0;
109−// uniform sampler2D source;
110−// uniform lowp float itemOpacity;
111−// void main(void)
112−// {
113−// highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
114−// sourceColor *= itemOpacity;
115−// gl_FragColor = sourceColor;
116−// }
117−// "
118−// }
119−
120−// ShaderEffect {
121−// id: middleVideo
122−// property variant source: ShaderEffectSource {
123−// sourceItem: videoOutput
124−// hideSource: true
125−// sourceRect: Qt.rect(units.gu(2), 0, videoOutput.width - units.gu(4), videoOutput.height)
126−// }
127−// anchors {
128−// top: parent.top
129−// bottom: parent.bottom
130−// left: leftVideo.right
131−// right: rightVideo.left
132−// }
133−// visible: mediaPlayer.playbackState !== MediaPlayer.StoppedState
134−
135−// property real itemOpacity: 1
136−
137−// fragmentShader: "
138−// varying highp vec2 qt_TexCoord0;
139−// uniform sampler2D source;
140−// uniform lowp float itemOpacity;
141−// void main(void)
142−// {
143−// highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
144−// sourceColor *= itemOpacity;
145−// gl_FragColor = sourceColor;
146−// }
147−// "
148−// }
149−
150−// ShaderEffect {
151−// id: rightVideo
152−// property variant source: ShaderEffectSource {
153−// sourceItem: videoOutput
154−// hideSource: true
155−// sourceRect: Qt.rect(videoOutput.width - units.gu(2), 0, units.gu(2), videoOutput.height)
156−// }
157−// anchors {
158−// top: parent.top
159−// bottom: parent.bottom
160−// right: parent.right
161−// }
162−// width: units.gu(2)
163−// visible: mediaPlayer.playbackState !== MediaPlayer.StoppedState
164−
165−// property real itemOpacity: 0.5
166−
167−// fragmentShader: "
168−// varying highp vec2 qt_TexCoord0;
169−// uniform sampler2D source;
170−// uniform lowp float itemOpacity;
171−// void main(void)
172−// {
173−// highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
174−// sourceColor *= itemOpacity;
175−// gl_FragColor = sourceColor;
176−// }
177−// "
178−// }
179−// }
180−// }
181−// }
80+ Connections {
81+ target: mediaPlayer
82+ onError: {
83+ if (error !== MediaPlayer.NoError) {
84+ errorTimer.restart();
85+ }
86+ }
87+ }
88+ }
18289 }
18390
18491 Rectangle {
@@ -195,9 +102,9 @@ Item {
195102 Behavior on width { UbuntuNumberAnimation {} }
196103
197104 Icon {
198− name: "media-playback-start"
199105 anchors.fill: parent
200106 anchors.margins: units.gu(1)
107+ name: errorTimer.running ? "dialog-warning-symbolic" : "media-playback-start"
201108 color: "#F3F3E7"
202109 }
203110 }
@@ -214,9 +121,15 @@ Item {
214121 MouseArea {
215122 id: contentMouseArea
216123 anchors.fill: content
124+ enabled: !errorTimer.running
217125 hoverEnabled: mediaPlayer && mediaPlayer.playbackState !== MediaPlayer.StoppedState || false
218126
219127 onClicked: root.clicked()
220128 onPositionChanged: root.positionChanged()
221129 }
130+
131+ Timer {
132+ id: errorTimer
133+ interval: 2000
134+ }
222135}