This file is indexed.

/usr/share/qt5/doc/qtmultimedia/qmediaplayer.html is in qtmultimedia5-doc-html 5.5.1-4ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qmediaplayer.cpp -->
  <title>QMediaPlayer Class | Qt Multimedia 5.5</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.5</li>
<li><a href="qtmultimedia-index.html">Qt Multimedia</a></li>
<li><a href="qtmultimedia-module.html">C++ Classes</a></li>
<li>QMediaPlayer</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QMediaPlayer Class</h1>
<!-- $$$QMediaPlayer-brief -->
<p>The <a href="qmediaplayer.html">QMediaPlayer</a> class allows the playing of a media source. <a href="#details">More...</a></p>
<!-- @@@QMediaPlayer -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;QMediaPlayer&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += multimedia</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qmediaobject.html">QMediaObject</a></td></tr></table></div><ul>
<li><a href="qmediaplayer-members.html">List of all members, including inherited members</a></li>
<li><a href="qmediaplayer-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#Error-enum">Error</a></b> { NoError, ResourceError, FormatError, NetworkError, AccessDeniedError, ServiceMissingError }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#Flag-enum">Flag</a></b> { LowLatency, StreamPlayback, VideoSurface }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#Flag-enum">Flags</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#MediaStatus-enum">MediaStatus</a></b> { UnknownMediaStatus, NoMedia, LoadingMedia, LoadedMedia, ..., InvalidMedia }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#State-enum">State</a></b> { StoppedState, PlayingState, PausedState }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qmediaplayer.html#audioAvailable-prop">audioAvailable</a></b> : const bool</li>
<li class="fn"><b><a href="qmediaplayer.html#audioRole-prop">audioRole</a></b> : QAudio::Role</li>
<li class="fn"><b><a href="qmediaplayer.html#bufferStatus-prop">bufferStatus</a></b> : const int</li>
<li class="fn"><b><a href="qmediaplayer.html#currentMedia-prop">currentMedia</a></b> : const QMediaContent</li>
<li class="fn"><b><a href="qmediaplayer.html#duration-prop">duration</a></b> : const qint64</li>
<li class="fn"><b><a href="qmediaplayer.html#error-prop">error</a></b> : const QString</li>
<li class="fn"><b><a href="qmediaplayer.html#media-prop">media</a></b> : QMediaContent</li>
<li class="fn"><b><a href="qmediaplayer.html#mediaStatus-prop">mediaStatus</a></b> : const MediaStatus</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qmediaplayer.html#muted-prop">muted</a></b> : bool</li>
<li class="fn"><b><a href="qmediaplayer.html#playbackRate-prop">playbackRate</a></b> : qreal</li>
<li class="fn"><b><a href="qmediaplayer.html#playlist-prop">playlist</a></b> : QMediaPlaylist *</li>
<li class="fn"><b><a href="qmediaplayer.html#position-prop">position</a></b> : qint64</li>
<li class="fn"><b><a href="qmediaplayer.html#seekable-prop">seekable</a></b> : const bool</li>
<li class="fn"><b><a href="qmediaplayer.html#state-prop">state</a></b> : const State</li>
<li class="fn"><b><a href="qmediaplayer.html#videoAvailable-prop">videoAvailable</a></b> : const bool</li>
<li class="fn"><b><a href="qmediaplayer.html#volume-prop">volume</a></b> : int</li>
</ul>
</td></tr>
</table></div>
<ul>
<li class="fn">1 property inherited from <a href="qmediaobject.html#properties">QMediaObject</a></li>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#QMediaPlayer">QMediaPlayer</a></b>(QObject *<i> parent</i> = 0, Flags<i> flags</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#dtor.QMediaPlayer">~QMediaPlayer</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAudio::Role </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#audioRole-prop">audioRole</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#bufferStatus-prop">bufferStatus</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMediaContent </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#currentMedia-prop">currentMedia</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QNetworkConfiguration </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#currentNetworkConfiguration">currentNetworkConfiguration</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#duration-prop">duration</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Error </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#error">error</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#error-prop">errorString</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#audioAvailable-prop">isAudioAvailable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#muted-prop">isMuted</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#seekable-prop">isSeekable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#videoAvailable-prop">isVideoAvailable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMediaContent </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#media-prop">media</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> MediaStatus </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#mediaStatus-prop">mediaStatus</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QIODevice * </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#mediaStream">mediaStream</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#playbackRate-prop">playbackRate</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMediaPlaylist * </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#playlist-prop">playlist</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#position-prop">position</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#audioRole-prop">setAudioRole</a></b>(QAudio::Role<i> audioRole</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#setVideoOutput">setVideoOutput</a></b>(QVideoWidget *<i> output</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#setVideoOutput-2">setVideoOutput</a></b>(QGraphicsVideoItem *<i> output</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#setVideoOutput-3">setVideoOutput</a></b>(QAbstractVideoSurface *<i> surface</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> State </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#state-prop">state</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QAudio::Role&gt; </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#supportedAudioRoles">supportedAudioRoles</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#volume-prop">volume</a></b>() const</td></tr>
</table></div>
<a name="reimplemented-public-functions"></a>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QMultimedia::AvailabilityStatus </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#availability">availability</a></b>() const</td></tr>
</table></div>
<ul>
<li class="fn">10 public functions inherited from <a href="qmediaobject.html#public-functions">QMediaObject</a></li>
<li class="fn">31 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#pause">pause</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#play">play</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#media-prop">setMedia</a></b>(const QMediaContent &amp;<i> media</i>, QIODevice *<i> stream</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#muted-prop">setMuted</a></b>(bool<i> muted</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#setNetworkConfigurations">setNetworkConfigurations</a></b>(const QList&lt;QNetworkConfiguration&gt; &amp;<i> configurations</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#playbackRate-prop">setPlaybackRate</a></b>(qreal<i> rate</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#playlist-prop">setPlaylist</a></b>(QMediaPlaylist *<i> playlist</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#position-prop">setPosition</a></b>(qint64<i> position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#volume-prop">setVolume</a></b>(int<i> volume</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#stop">stop</a></b>()</td></tr>
</table></div>
<ul>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#audioAvailable-prop">audioAvailableChanged</a></b>(bool<i> available</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#audioRoleChanged">audioRoleChanged</a></b>(QAudio::Role<i> role</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#bufferStatus-prop">bufferStatusChanged</a></b>(int<i> percentFilled</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#currentMedia-prop">currentMediaChanged</a></b>(const QMediaContent &amp;<i> media</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#duration-prop">durationChanged</a></b>(qint64<i> duration</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#error-2">error</a></b>(QMediaPlayer::Error<i> error</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#media-prop">mediaChanged</a></b>(const QMediaContent &amp;<i> media</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#mediaStatus-prop">mediaStatusChanged</a></b>(QMediaPlayer::MediaStatus<i> status</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#muted-prop">mutedChanged</a></b>(bool<i> muted</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#networkConfigurationChanged">networkConfigurationChanged</a></b>(const QNetworkConfiguration &amp;<i> configuration</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#playbackRate-prop">playbackRateChanged</a></b>(qreal<i> rate</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#position-prop">positionChanged</a></b>(qint64<i> position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#seekable-prop">seekableChanged</a></b>(bool<i> seekable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#state-prop">stateChanged</a></b>(QMediaPlayer::State<i> state</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#videoAvailable-prop">videoAvailableChanged</a></b>(bool<i> videoAvailable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#volume-prop">volumeChanged</a></b>(int<i> volume</i>)</td></tr>
</table></div>
<ul>
<li class="fn">6 signals inherited from <a href="qmediaobject.html#signals">QMediaObject</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QMultimedia::SupportEstimate </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#hasSupport">hasSupport</a></b>(const QString &amp;<i> mimeType</i>, const QStringList &amp;<i> codecs</i> = QStringList(), Flags<i> flags</i> = 0)</td></tr>
</table></div>
<ul>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">2 protected functions inherited from <a href="qmediaobject.html#protected-functions">QMediaObject</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QMediaPlayer-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qmediaplayer.html">QMediaPlayer</a> class allows the playing of a media source.</p>
<p>The <a href="qmediaplayer.html">QMediaPlayer</a> class is a high level media playback class. It can be used to playback such content as songs, movies and internet radio. The content to playback is specified as a <a href="qmediacontent.html">QMediaContent</a> object, which can be thought of as a main or canonical URL with additional information attached. When provided with a <a href="qmediacontent.html">QMediaContent</a> playback may be able to commence.</p>
<pre class="cpp">player <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qmediaplayer.html#QMediaPlayer">QMediaPlayer</a></span>;
connect(player<span class="operator">,</span> SIGNAL(positionChanged(<span class="type"><a href="../qtcore/qtglobal.html#qint64-typedef">qint64</a></span>))<span class="operator">,</span> <span class="keyword">this</span><span class="operator">,</span> SLOT(positionChanged(<span class="type"><a href="../qtcore/qtglobal.html#qint64-typedef">qint64</a></span>)));
player<span class="operator">-</span><span class="operator">&gt;</span>setMedia(<span class="type"><a href="../qtcore/qurl.html">QUrl</a></span><span class="operator">::</span>fromLocalFile(<span class="string">&quot;/Users/me/Music/coolsong.mp3&quot;</span>));
player<span class="operator">-</span><span class="operator">&gt;</span>setVolume(<span class="number">50</span>);
player<span class="operator">-</span><span class="operator">&gt;</span>play();</pre>
<p>QVideoWidget can be used with <a href="qmediaplayer.html">QMediaPlayer</a> for video rendering and <a href="qmediaplaylist.html">QMediaPlaylist</a> for accessing playlist functionality.</p>
<pre class="cpp">playlist <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qmediaplaylist.html">QMediaPlaylist</a></span>;
playlist<span class="operator">-</span><span class="operator">&gt;</span>addMedia(<span class="type"><a href="../qtcore/qurl.html">QUrl</a></span>(<span class="string">&quot;http://example.com/movie1.mp4&quot;</span>));
playlist<span class="operator">-</span><span class="operator">&gt;</span>addMedia(<span class="type"><a href="../qtcore/qurl.html">QUrl</a></span>(<span class="string">&quot;http://example.com/movie2.mp4&quot;</span>));
playlist<span class="operator">-</span><span class="operator">&gt;</span>addMedia(<span class="type"><a href="../qtcore/qurl.html">QUrl</a></span>(<span class="string">&quot;http://example.com/movie3.mp4&quot;</span>));
playlist<span class="operator">-</span><span class="operator">&gt;</span>setCurrentIndex(<span class="number">1</span>);

player <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qmediaplayer.html#QMediaPlayer">QMediaPlayer</a></span>;
player<span class="operator">-</span><span class="operator">&gt;</span>setPlaylist(playlist);

videoWidget <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QVideoWidget</span>;
player<span class="operator">-</span><span class="operator">&gt;</span>setVideoOutput(videoWidget);
videoWidget<span class="operator">-</span><span class="operator">&gt;</span>show();

player<span class="operator">-</span><span class="operator">&gt;</span>play();</pre>
<p>Since <a href="qmediaplayer.html">QMediaPlayer</a> is a <a href="qmediaobject.html">QMediaObject</a>, you can use several of the <a href="qmediaobject.html">QMediaObject</a> functions for things like:</p>
<ul>
<li>Accessing the currently playing media's metadata (<a href="qmediaobject.html#metaData">QMediaObject::metaData</a>() and <a href="qmediametadata.html">predefined meta-data keys</a>)</li>
<li>Checking to see if the media playback service is currently available (<a href="qmediaobject.html#availability">QMediaObject::availability</a>())</li>
</ul>
</div>
<p><b>See also </b><a href="qmediaobject.html">QMediaObject</a>, <a href="qmediaservice.html">QMediaService</a>, QVideoWidget, and <a href="qmediaplaylist.html">QMediaPlaylist</a>.</p>
<!-- @@@QMediaPlayer -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Error$$$NoError$$$ResourceError$$$FormatError$$$NetworkError$$$AccessDeniedError$$$ServiceMissingError$$$MediaIsPlaylist -->
<h3 class="fn" id="Error-enum"><a name="Error-enum"></a>enum QMediaPlayer::<span class="name">Error</span></h3>
<p>Defines a media player error condition.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QMediaPlayer::NoError</code></td><td class="topAlign"><code>0</code></td><td class="topAlign">No error has occurred.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::ResourceError</code></td><td class="topAlign"><code>1</code></td><td class="topAlign">A media resource couldn't be resolved.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::FormatError</code></td><td class="topAlign"><code>2</code></td><td class="topAlign">The format of a media resource isn't (fully) supported. Playback may still be possible, but without an audio or video component.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::NetworkError</code></td><td class="topAlign"><code>3</code></td><td class="topAlign">A network error occurred.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::AccessDeniedError</code></td><td class="topAlign"><code>4</code></td><td class="topAlign">There are not the appropriate permissions to play a media resource.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::ServiceMissingError</code></td><td class="topAlign"><code>5</code></td><td class="topAlign">A valid playback service was not found, playback cannot proceed.</td></tr>
</table></div>
<!-- @@@Error -->
<!-- $$$Flag$$$LowLatency$$$StreamPlayback$$$VideoSurface -->
<h3 class="flags" id="Flag-enum"><a name="Flag-enum"></a>enum QMediaPlayer::<span class="name">Flag</span><br/>flags QMediaPlayer::<span class="name">Flags</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QMediaPlayer::LowLatency</code></td><td class="topAlign"><code>0x01</code></td><td class="topAlign">The player is expected to be used with simple audio formats, but playback should start without significant delay. Such playback service can be used for beeps, ringtones, etc.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::StreamPlayback</code></td><td class="topAlign"><code>0x02</code></td><td class="topAlign">The player is expected to play <a href="../qtcore/qiodevice.html">QIODevice</a> based streams. If passed to <a href="qmediaplayer.html">QMediaPlayer</a> constructor, the service supporting streams playback will be chosen.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::VideoSurface</code></td><td class="topAlign"><code>0x04</code></td><td class="topAlign">The player is expected to be able to render to a <a href="qabstractvideosurface.html">QAbstractVideoSurface</a> <a href="qmediaplayer.html#setVideoOutput">output</a>.</td></tr>
</table></div>
<p>The Flags type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;Flag&gt;. It stores an OR combination of Flag values.</p>
<!-- @@@Flag -->
<!-- $$$MediaStatus$$$UnknownMediaStatus$$$NoMedia$$$LoadingMedia$$$LoadedMedia$$$StalledMedia$$$BufferingMedia$$$BufferedMedia$$$EndOfMedia$$$InvalidMedia -->
<h3 class="fn" id="MediaStatus-enum"><a name="MediaStatus-enum"></a>enum QMediaPlayer::<span class="name">MediaStatus</span></h3>
<p>Defines the status of a media player's current media.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QMediaPlayer::UnknownMediaStatus</code></td><td class="topAlign"><code>0</code></td><td class="topAlign">The status of the media cannot be determined.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::NoMedia</code></td><td class="topAlign"><code>1</code></td><td class="topAlign">The is no current media. The player is in the <a href="qmediaplayer.html#State-enum">StoppedState</a>.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::LoadingMedia</code></td><td class="topAlign"><code>2</code></td><td class="topAlign">The current media is being loaded. The player may be in any state.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::LoadedMedia</code></td><td class="topAlign"><code>3</code></td><td class="topAlign">The current media has been loaded. The player is in the <a href="qmediaplayer.html#State-enum">StoppedState</a>.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::StalledMedia</code></td><td class="topAlign"><code>4</code></td><td class="topAlign">Playback of the current media has stalled due to insufficient buffering or some other temporary interruption. The player is in the <a href="qmediaplayer.html#State-enum">PlayingState</a> or <a href="qmediaplayer.html#State-enum">PausedState</a>.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::BufferingMedia</code></td><td class="topAlign"><code>5</code></td><td class="topAlign">The player is buffering data but has enough data buffered for playback to continue for the immediate future. The player is in the <a href="qmediaplayer.html#State-enum">PlayingState</a> or <a href="qmediaplayer.html#State-enum">PausedState</a>.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::BufferedMedia</code></td><td class="topAlign"><code>6</code></td><td class="topAlign">The player has fully buffered the current media. The player is in the <a href="qmediaplayer.html#State-enum">PlayingState</a> or <a href="qmediaplayer.html#State-enum">PausedState</a>.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::EndOfMedia</code></td><td class="topAlign"><code>7</code></td><td class="topAlign">Playback has reached the end of the current media. The player is in the <a href="qmediaplayer.html#State-enum">StoppedState</a>.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::InvalidMedia</code></td><td class="topAlign"><code>8</code></td><td class="topAlign">The current media cannot be played. The player is in the <a href="qmediaplayer.html#State-enum">StoppedState</a>.</td></tr>
</table></div>
<!-- @@@MediaStatus -->
<!-- $$$State$$$StoppedState$$$PlayingState$$$PausedState -->
<h3 class="fn" id="State-enum"><a name="State-enum"></a>enum QMediaPlayer::<span class="name">State</span></h3>
<p>Defines the current state of a media player.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QMediaPlayer::StoppedState</code></td><td class="topAlign"><code>0</code></td><td class="topAlign">The media player is not playing content, playback will begin from the start of the current track.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::PlayingState</code></td><td class="topAlign"><code>1</code></td><td class="topAlign">The media player is currently playing content.</td></tr>
<tr><td class="topAlign"><code>QMediaPlayer::PausedState</code></td><td class="topAlign"><code>2</code></td><td class="topAlign">The media player has paused playback, playback of the current track will resume from the position the player was paused at.</td></tr>
</table></div>
<!-- @@@State -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$audioAvailable-prop$$$isAudioAvailable$$$audioAvailableChangedbool -->
<h3 class="fn" id="audioAvailable-prop"><a name="audioAvailable-prop"></a><span class="name">audioAvailable</span> : const <span class="type">bool</span></h3>
<p>This property holds the audio availabilty status for the current media.</p>
<p>As the life time of <a href="qmediaplayer.html">QMediaPlayer</a> can be longer than the playback of one <a href="qmediacontent.html">QMediaContent</a>, this property may change over time, the audioAvailableChanged signal can be used to monitor it's status.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isAudioAvailable</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>audioAvailableChanged</b></span>(bool<i> available</i>)</td></tr>
</table></div>
<!-- @@@audioAvailable -->
<!-- $$$audioRole-prop$$$audioRole$$$setAudioRoleQAudio::Role -->
<h3 class="fn" id="audioRole-prop"><a name="audioRole-prop"></a><span class="name">audioRole</span> : <span class="type"><a href="qaudio.html#Role-enum">QAudio::Role</a></span></h3>
<p>This property holds the role of the audio stream played by the media player.</p>
<p>It can be set to specify the type of audio being played, allowing the system to make appropriate decisions when it comes to volume, routing or post-processing.</p>
<p>The audio role must be set before calling <a href="qmediaplayer.html#media-prop">setMedia</a>().</p>
<p>This property was introduced in  Qt 5.6.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QAudio::Role </td><td class="memItemRight bottomAlign"><span class="name"><b>audioRole</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAudioRole</b></span>(QAudio::Role<i> audioRole</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qmediaplayer.html#supportedAudioRoles">supportedAudioRoles</a>().</p>
<!-- @@@audioRole -->
<!-- $$$bufferStatus-prop$$$bufferStatus$$$bufferStatusChangedint -->
<h3 class="fn" id="bufferStatus-prop"><a name="bufferStatus-prop"></a><span class="name">bufferStatus</span> : const <span class="type">int</span></h3>
<p>This property holds the percentage of the temporary buffer filled before playback begins or resumes, from  (empty) to  (full).</p>
<p>When the player object is buffering; this property holds the percentage of the temporary buffer that is filled. The buffer will need to reach 100% filled before playback can start or resume, at which time <a href="qmediaplayer.html#mediaStatus-prop">mediaStatus</a>() will return <a href="qmediaplayer.html#MediaStatus-enum">BufferedMedia</a> or <a href="qmediaplayer.html#MediaStatus-enum">BufferingMedia</a>. If the value is anything lower than <code>100</code>, <a href="qmediaplayer.html#mediaStatus-prop">mediaStatus</a>() will return <a href="qmediaplayer.html#MediaStatus-enum">StalledMedia</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>bufferStatus</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>bufferStatusChanged</b></span>(int<i> percentFilled</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qmediaplayer.html#mediaStatus-prop">mediaStatus</a>().</p>
<!-- @@@bufferStatus -->
<!-- $$$currentMedia-prop$$$currentMedia$$$currentMediaChangedconstQMediaContent& -->
<h3 class="fn" id="currentMedia-prop"><a name="currentMedia-prop"></a><span class="name">currentMedia</span> : const <span class="type"><a href="qmediacontent.html">QMediaContent</a></span></h3>
<p>This property holds the current active media content being played by the player object. This value could be different from QMediaPlayer::media property if a playlist is used. In this case currentMedia indicates the current media content being processed by the player, while QMediaPlayer::media property contains the original playlist.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QMediaContent </td><td class="memItemRight bottomAlign"><span class="name"><b>currentMedia</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>currentMediaChanged</b></span>(const QMediaContent &amp;<i> media</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qmediacontent.html">QMediaContent</a> and <a href="qmediaplayer.html#media-prop">media</a>().</p>
<!-- @@@currentMedia -->
<!-- $$$duration-prop$$$duration$$$durationChangedqint64 -->
<h3 class="fn" id="duration-prop"><a name="duration-prop"></a><span class="name">duration</span> : const <span class="type"><a href="../qtcore/qtglobal.html#qint64-typedef">qint64</a></span></h3>
<p>This property holds the duration of the current media.</p>
<p>The value is the total playback time in milliseconds of the current media. The value may change across the life time of the <a href="qmediaplayer.html">QMediaPlayer</a> object and may not be available when initial playback begins, connect to the durationChanged() signal to receive status notifications.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qint64 </td><td class="memItemRight bottomAlign"><span class="name"><b>duration</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>durationChanged</b></span>(qint64<i> duration</i>)</td></tr>
</table></div>
<!-- @@@duration -->
<!-- $$$error-prop$$$errorString -->
<h3 class="fn" id="error-prop"><a name="error-prop"></a><span class="name">error</span> : const <span class="type"><a href="../qtcore/qstring.html">QString</a></span></h3>
<p>This property holds a string describing the last error condition.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>errorString</b></span>() const</td></tr>
</table></div>
<p><b>See also </b><a href="qmediaplayer.html#error">error</a>().</p>
<!-- @@@error -->
<!-- $$$media-prop$$$media$$$setMediaconstQMediaContent&QIODevice*$$$mediaChangedconstQMediaContent& -->
<h3 class="fn" id="media-prop"><a name="media-prop"></a><span class="name">media</span> : <span class="type"><a href="qmediacontent.html">QMediaContent</a></span></h3>
<p>This property holds the active media source being used by the player object.</p>
<p>The player object will use the <a href="qmediacontent.html">QMediaContent</a> for selection of the content to be played.</p>
<p>By default this property has a null <a href="qmediacontent.html">QMediaContent</a>.</p>
<p>Setting this property to a null <a href="qmediacontent.html">QMediaContent</a> will cause the player to discard all information relating to the current media source and to cease all I/O operations related to that media.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QMediaContent </td><td class="memItemRight bottomAlign"><span class="name"><b>media</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMedia</b></span>(const QMediaContent &amp;<i> media</i>, QIODevice *<i> stream</i> = 0)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>mediaChanged</b></span>(const QMediaContent &amp;<i> media</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qmediacontent.html">QMediaContent</a> and <a href="qmediaplayer.html#currentMedia-prop">currentMedia</a>().</p>
<!-- @@@media -->
<!-- $$$mediaStatus-prop$$$mediaStatus$$$mediaStatusChangedQMediaPlayer::MediaStatus -->
<h3 class="fn" id="mediaStatus-prop"><a name="mediaStatus-prop"></a><span class="name">mediaStatus</span> : const <span class="type"><a href="qmediaplayer.html#MediaStatus-enum">MediaStatus</a></span></h3>
<p>This property holds the status of the current media stream.</p>
<p>The stream status describes how the playback of the current stream is progressing.</p>
<p>By default this property is <a href="qmediaplayer.html#MediaStatus-enum">QMediaPlayer::NoMedia</a></p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> MediaStatus </td><td class="memItemRight bottomAlign"><span class="name"><b>mediaStatus</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>mediaStatusChanged</b></span>(QMediaPlayer::MediaStatus<i> status</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qmediaplayer.html#state-prop">state</a>.</p>
<!-- @@@mediaStatus -->
<!-- $$$muted-prop$$$isMuted$$$setMutedbool$$$mutedChangedbool -->
<h3 class="fn" id="muted-prop"><a name="muted-prop"></a><span class="name">muted</span> : <span class="type">bool</span></h3>
<p>This property holds the muted state of the current media.</p>
<p>The value will be true if the playback volume is muted; otherwise false.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isMuted</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMuted</b></span>(bool<i> muted</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>mutedChanged</b></span>(bool<i> muted</i>)</td></tr>
</table></div>
<!-- @@@muted -->
<!-- $$$playbackRate-prop$$$playbackRate$$$setPlaybackRateqreal$$$playbackRateChangedqreal -->
<h3 class="fn" id="playbackRate-prop"><a name="playbackRate-prop"></a><span class="name">playbackRate</span> : <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span></h3>
<p>This property holds the playback rate of the current media.</p>
<p>This value is a multiplier applied to the media's standard play rate. By default this value is 1.0, indicating that the media is playing at the standard pace. Values higher than 1.0 will increase the rate of play. Values less than zero can be set and indicate the media will rewind at the multiplier of the standard pace.</p>
<p>Not all playback services support change of the playback rate. It is framework defined as to the status and quality of audio and video while fast forwarding or rewinding.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>playbackRate</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPlaybackRate</b></span>(qreal<i> rate</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>playbackRateChanged</b></span>(qreal<i> rate</i>)</td></tr>
</table></div>
<!-- @@@playbackRate -->
<!-- $$$playlist-prop$$$playlist$$$setPlaylistQMediaPlaylist* -->
<h3 class="fn" id="playlist-prop"><a name="playlist-prop"></a><span class="name">playlist</span> : <span class="type"><a href="qmediaplaylist.html">QMediaPlaylist</a></span> *</h3>
<p>This property holds the media playlist being used by the player object.</p>
<p>The player object will use the current playlist item for selection of the content to be played.</p>
<p>By default this property is set to null.</p>
<p>If the media playlist is used as a source, <a href="qmediaplayer.html#currentMedia-prop">QMediaPlayer::currentMedia</a> is updated with a current playlist item. The current source should be selected with <a href="qmediaplaylist.html#currentIndex-prop">QMediaPlaylist::setCurrentIndex</a>(int) instead of <a href="qmediaplayer.html#media-prop">QMediaPlayer::setMedia</a>(), otherwise the current playlist will be discarded.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QMediaPlaylist * </td><td class="memItemRight bottomAlign"><span class="name"><b>playlist</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPlaylist</b></span>(QMediaPlaylist *<i> playlist</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qmediacontent.html">QMediaContent</a>.</p>
<!-- @@@playlist -->
<!-- $$$position-prop$$$position$$$setPositionqint64$$$positionChangedqint64 -->
<h3 class="fn" id="position-prop"><a name="position-prop"></a><span class="name">position</span> : <span class="type"><a href="../qtcore/qtglobal.html#qint64-typedef">qint64</a></span></h3>
<p>This property holds the playback position of the current media.</p>
<p>The value is the current playback position, expressed in milliseconds since the beginning of the media. Periodically changes in the position will be indicated with the signal positionChanged(), the interval between updates can be set with <a href="qmediaobject.html">QMediaObject</a>'s method <a href="qmediaobject.html#notifyInterval-prop">setNotifyInterval</a>().</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qint64 </td><td class="memItemRight bottomAlign"><span class="name"><b>position</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPosition</b></span>(qint64<i> position</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>positionChanged</b></span>(qint64<i> position</i>)</td></tr>
</table></div>
<!-- @@@position -->
<!-- $$$seekable-prop$$$isSeekable$$$seekableChangedbool -->
<h3 class="fn" id="seekable-prop"><a name="seekable-prop"></a><span class="name">seekable</span> : const <span class="type">bool</span></h3>
<p>This property holds the seek-able status of the current media.</p>
<p>If seeking is supported this property will be true; false otherwise. The status of this property may change across the life time of the <a href="qmediaplayer.html">QMediaPlayer</a> object, use the seekableChanged signal to monitor changes.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isSeekable</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>seekableChanged</b></span>(bool<i> seekable</i>)</td></tr>
</table></div>
<!-- @@@seekable -->
<!-- $$$state-prop$$$state$$$stateChangedQMediaPlayer::State -->
<h3 class="fn" id="state-prop"><a name="state-prop"></a><span class="name">state</span> : const <span class="type"><a href="qmediaplayer.html#State-enum">State</a></span></h3>
<p>This property holds the media player's playback state.</p>
<p>By default this property is QMediaPlayer::Stopped</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> State </td><td class="memItemRight bottomAlign"><span class="name"><b>state</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>stateChanged</b></span>(QMediaPlayer::State<i> state</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qmediaplayer.html#mediaStatus-prop">mediaStatus</a>(), <a href="qmediaplayer.html#play">play</a>(), <a href="qmediaplayer.html#pause">pause</a>(), and <a href="qmediaplayer.html#stop">stop</a>().</p>
<!-- @@@state -->
<!-- $$$videoAvailable-prop$$$isVideoAvailable$$$videoAvailableChangedbool -->
<h3 class="fn" id="videoAvailable-prop"><a name="videoAvailable-prop"></a><span class="name">videoAvailable</span> : const <span class="type">bool</span></h3>
<p>This property holds the video availability status for the current media.</p>
<p>If available, the QVideoWidget class can be used to view the video. As the life time of <a href="qmediaplayer.html">QMediaPlayer</a> can be longer than the playback of one <a href="qmediacontent.html">QMediaContent</a>, this property may change over time, the videoAvailableChanged signal can be used to monitor it's status.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isVideoAvailable</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>videoAvailableChanged</b></span>(bool<i> videoAvailable</i>)</td></tr>
</table></div>
<p><b>See also </b>QVideoWidget and <a href="qmediacontent.html">QMediaContent</a>.</p>
<!-- @@@videoAvailable -->
<!-- $$$volume-prop$$$volume$$$setVolumeint$$$volumeChangedint -->
<h3 class="fn" id="volume-prop"><a name="volume-prop"></a><span class="name">volume</span> : <span class="type">int</span></h3>
<p>This property holds the current playback volume.</p>
<p>The playback volume is linear in effect and the value can range from 0 - 100, values outside this range will be clamped.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>volume</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setVolume</b></span>(int<i> volume</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>volumeChanged</b></span>(int<i> volume</i>)</td></tr>
</table></div>
<!-- @@@volume -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QMediaPlayer[overload1]$$$QMediaPlayerQObject*Flags -->
<h3 class="fn" id="QMediaPlayer"><a name="QMediaPlayer"></a>QMediaPlayer::<span class="name">QMediaPlayer</span>(<span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i> parent</i> = 0, <span class="type"><a href="qmediaplayer.html#Flag-enum">Flags</a></span><i> flags</i> = 0)</h3>
<p>Construct a <a href="qmediaplayer.html">QMediaPlayer</a> instance parented to <i>parent</i> and with <i>flags</i>.</p>
<!-- @@@QMediaPlayer -->
<!-- $$$~QMediaPlayer[overload1]$$$~QMediaPlayer -->
<h3 class="fn" id="dtor.QMediaPlayer"><a name="dtor.QMediaPlayer"></a>QMediaPlayer::<span class="name">~QMediaPlayer</span>()</h3>
<p>Destroys the player object.</p>
<!-- @@@~QMediaPlayer -->
<!-- $$$audioRoleChanged[overload1]$$$audioRoleChangedQAudio::Role -->
<h3 class="fn" id="audioRoleChanged"><a name="audioRoleChanged"></a><code>[signal] </code><span class="type">void</span> QMediaPlayer::<span class="name">audioRoleChanged</span>(<span class="type"><a href="qaudio.html#Role-enum">QAudio::Role</a></span><i> role</i>)</h3>
<p>Signals that the audio <i>role</i> of the media player has changed.</p>
<p>This function was introduced in  Qt 5.6.</p>
<!-- @@@audioRoleChanged -->
<!-- $$$availability[overload1]$$$availability -->
<h3 class="fn" id="availability"><a name="availability"></a><code>[virtual] </code><span class="type"><a href="qmultimedia.html#AvailabilityStatus-enum">QMultimedia::AvailabilityStatus</a></span> QMediaPlayer::<span class="name">availability</span>() const</h3>
<p>Reimplemented from <a href="qmediaobject.html#availability">QMediaObject::availability</a>().</p>
<!-- @@@availability -->
<!-- $$$currentNetworkConfiguration[overload1]$$$currentNetworkConfiguration -->
<h3 class="fn" id="currentNetworkConfiguration"><a name="currentNetworkConfiguration"></a><span class="type">QNetworkConfiguration</span> QMediaPlayer::<span class="name">currentNetworkConfiguration</span>() const</h3>
<p>Returns the current network access point in use. If a default contructed QNetworkConfiguration is returned this feature is not available or that none of the current supplied configurations are in use.</p>
<!-- @@@currentNetworkConfiguration -->
<!-- $$$error[overload1]$$$error -->
<h3 class="fn" id="error"><a name="error"></a><span class="type"><a href="qmediaplayer.html#Error-enum">Error</a></span> QMediaPlayer::<span class="name">error</span>() const</h3>
<p>Returns the current error state.</p>
<!-- @@@error -->
<!-- $$$error$$$errorQMediaPlayer::Error -->
<h3 class="fn" id="error-2"><a name="error-2"></a><code>[signal] </code><span class="type">void</span> QMediaPlayer::<span class="name">error</span>(<span class="type"><a href="qmediaplayer.html#Error-enum">QMediaPlayer::Error</a></span><i> error</i>)</h3>
<p>Signals that an <i>error</i> condition has occurred.</p>
<p><b>See also </b><a href="qmediaplayer.html#error-prop">errorString</a>().</p>
<!-- @@@error -->
<!-- $$$hasSupport[overload1]$$$hasSupportconstQString&constQStringList&Flags -->
<h3 class="fn" id="hasSupport"><a name="hasSupport"></a><code>[static] </code><span class="type"><a href="qmultimedia.html#SupportEstimate-enum">QMultimedia::SupportEstimate</a></span> QMediaPlayer::<span class="name">hasSupport</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i> mimeType</i>, const <span class="type"><a href="../qtcore/qstringlist.html">QStringList</a></span> &amp;<i> codecs</i> = QStringList(), <span class="type"><a href="qmediaplayer.html#Flag-enum">Flags</a></span><i> flags</i> = 0)</h3>
<p>Returns the level of support a media player has for a <i>mimeType</i> and a set of <i>codecs</i>.</p>
<p>The <i>flags</i> argument allows additional requirements such as performance indicators to be specified.</p>
<!-- @@@hasSupport -->
<!-- $$$mediaStream[overload1]$$$mediaStream -->
<h3 class="fn" id="mediaStream"><a name="mediaStream"></a>const <span class="type"><a href="../qtcore/qiodevice.html">QIODevice</a></span> * QMediaPlayer::<span class="name">mediaStream</span>() const</h3>
<p>Returns the stream source of media data.</p>
<p>This is only valid if a stream was passed to <a href="qmediaplayer.html#media-prop">setMedia</a>().</p>
<p><b>See also </b><a href="qmediaplayer.html#media-prop">setMedia</a>().</p>
<!-- @@@mediaStream -->
<!-- $$$networkConfigurationChanged[overload1]$$$networkConfigurationChangedconstQNetworkConfiguration& -->
<h3 class="fn" id="networkConfigurationChanged"><a name="networkConfigurationChanged"></a><code>[signal] </code><span class="type">void</span> QMediaPlayer::<span class="name">networkConfigurationChanged</span>(const <span class="type">QNetworkConfiguration</span> &amp;<i> configuration</i>)</h3>
<p>Signal that the active in use network access point has been changed to <i>configuration</i> and all subsequent network access will use this <i>configuration</i>.</p>
<!-- @@@networkConfigurationChanged -->
<!-- $$$pause[overload1]$$$pause -->
<h3 class="fn" id="pause"><a name="pause"></a><code>[slot] </code><span class="type">void</span> QMediaPlayer::<span class="name">pause</span>()</h3>
<p>Pause playing the current source.</p>
<!-- @@@pause -->
<!-- $$$play[overload1]$$$play -->
<h3 class="fn" id="play"><a name="play"></a><code>[slot] </code><span class="type">void</span> QMediaPlayer::<span class="name">play</span>()</h3>
<p>Start or resume playing the current source.</p>
<!-- @@@play -->
<!-- $$$setNetworkConfigurations[overload1]$$$setNetworkConfigurationsconstQList<QNetworkConfiguration>& -->
<h3 class="fn" id="setNetworkConfigurations"><a name="setNetworkConfigurations"></a><code>[slot] </code><span class="type">void</span> QMediaPlayer::<span class="name">setNetworkConfigurations</span>(const <span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type">QNetworkConfiguration</span>&gt; &amp;<i> configurations</i>)</h3>
<p>Sets the network access points for remote media playback. <i>configurations</i> contains, in ascending preferential order, a list of configuration that can be used for network access.</p>
<p>This will invalidate the choice of previous configurations.</p>
<!-- @@@setNetworkConfigurations -->
<!-- $$$setVideoOutput[overload1]$$$setVideoOutputQVideoWidget* -->
<h3 class="fn" id="setVideoOutput"><a name="setVideoOutput"></a><span class="type">void</span> QMediaPlayer::<span class="name">setVideoOutput</span>(<span class="type">QVideoWidget</span> *<i> output</i>)</h3>
<p>Attach a QVideoWidget video <i>output</i> to the media player.</p>
<p>If the media player has already video output attached, it will be replaced with a new one.</p>
<!-- @@@setVideoOutput -->
<!-- $$$setVideoOutput$$$setVideoOutputQGraphicsVideoItem* -->
<h3 class="fn" id="setVideoOutput-2"><a name="setVideoOutput-2"></a><span class="type">void</span> QMediaPlayer::<span class="name">setVideoOutput</span>(<span class="type">QGraphicsVideoItem</span> *<i> output</i>)</h3>
<p>Attach a QGraphicsVideoItem video <i>output</i> to the media player.</p>
<p>If the media player has already video output attached, it will be replaced with a new one.</p>
<!-- @@@setVideoOutput -->
<!-- $$$setVideoOutput$$$setVideoOutputQAbstractVideoSurface* -->
<h3 class="fn" id="setVideoOutput-3"><a name="setVideoOutput-3"></a><span class="type">void</span> QMediaPlayer::<span class="name">setVideoOutput</span>(<span class="type"><a href="qabstractvideosurface.html">QAbstractVideoSurface</a></span> *<i> surface</i>)</h3>
<p>Sets a video <i>surface</i> as the video output of a media player.</p>
<p>If a video output has already been set on the media player the new surface will replace it.</p>
<!-- @@@setVideoOutput -->
<!-- $$$stop[overload1]$$$stop -->
<h3 class="fn" id="stop"><a name="stop"></a><code>[slot] </code><span class="type">void</span> QMediaPlayer::<span class="name">stop</span>()</h3>
<p>Stop playing, and reset the play position to the beginning.</p>
<!-- @@@stop -->
<!-- $$$supportedAudioRoles[overload1]$$$supportedAudioRoles -->
<h3 class="fn" id="supportedAudioRoles"><a name="supportedAudioRoles"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qaudio.html#Role-enum">QAudio::Role</a></span>&gt; QMediaPlayer::<span class="name">supportedAudioRoles</span>() const</h3>
<p>Returns a list of supported audio roles.</p>
<p>If setting the audio role is not supported, an empty list is returned.</p>
<p>This function was introduced in  Qt 5.6.</p>
<p><b>See also </b><a href="qmediaplayer.html#audioRole-prop">audioRole</a>.</p>
<!-- @@@supportedAudioRoles -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>