~justinmcp/webbrowser-app/mediaplayer

« back to all changes in this revision

Viewing changes to src/Ubuntu/Web/UbuntuWebView02.qml

  • Committer: Justin McPherson
  • Date: 2015-06-03 06:52:01 UTC
  • Revision ID: justin@phablet-dev-20150603065201-835y2sq9o6dom2f5
WIP

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
        }
251
251
    }
252
252
 
253
 
    MediaPlayer {
254
 
        id: player
255
 
        anchors.fill: parent
256
 
        visible: playbackState == 1/*Playing*/ || playbackState == 2/*Paused*/
 
253
        MediaPlayer {
 
254
                id: player
 
255
        anchors.fill: parent
 
256
        visible: false
257
257
 
258
258
        onPlaybackStateChanged: {
259
259
            if (playbackState == 1/*Playing*/) {
 
260
                visible = true
260
261
                _webview.fullscreen = true
261
262
            } else if (playbackState == 0/*Stopped*/) {
 
263
                visible = false
262
264
                _webview.fullscreen = false
263
265
            }
264
266
        }
265
267
 
266
 
        onCloseClicked: {
 
268
        // These MUST stay, apparent signal propagation bug
 
269
        onPositionChanged: { }
 
270
        onDurationChanged: { }
 
271
 
 
272
                onCloseClicked: {
267
273
            stop();
268
 
        }
269
 
    }
 
274
                        source = null
 
275
                }
 
276
        }
270
277
 
271
278
    mediaPlayer: player
272
279