Bug 1085212: release video hardware before sharing and restore when done

Followup fix for bug 1088456: use playerShowing instead of playing so the patch works even if we are paused

address review comments
Merge pull request #25911 from davidflanagan/bug1085212

Bug 1085212: release video hardware before sharing and restore when done r=russn