:: vor / :: nach Pseudoklasse funktioniert nicht bei Videoelement

Ich möchte, dass mein Videoelement während der Wiedergabe einen Titel über dem Video anzeigt. Das Problem ist: Es funktioniert nicht. Wenn ich das <video> -Tag auf ein <div> ändere, funktioniert es einwandfrei. Was mache ich falsch

Mein HTML-Markup lautet wie folgt:

<div class="player">
    <video src="video.mp4" poster="video-poster.jpg" title="Video Name"></video>
</div>

Und mein CSS ist das:

.player {
    position: relative;
    width: 852px;
    height: 356px;
}
.player video {
    position: relative;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: block;
}
.player video::after {
    content: attr(title);
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    display: block;
    height: 20px;
}

Antworten auf die Frage(2)

Ihre Antwort auf die Frage