Skip to content

bug(Youtube player): 100% width #28489

Closed
Closed
@javatlacati

Description

@javatlacati

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

16.2.12

Description

For mobile devices sometimes we'd like to make the YouTube video 100% of the width.

In order to achieve that in previous versions I did as follows:

<div #demoYouTubePlayer id="demoYouTubePlayer" class="demo-youtube-player">
            <youtube-player
                    [videoId]="song?.video?.id"
                    suggestedQuality="highres"
                    [height]="250"
                    style="width:100%"
                    [startSeconds]="song?.video?.start||0">
            </youtube-player>
    </div>

yet now it's not working.

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-k5bgl5?file=src%2Findex.html
Steps to reproduce:

  1. update from 16.2.12 to 17.1.1

Expected Behavior

It shoult take the whole width of the screen

Actual Behavior

style doesn't affect the result probably now it's embedded in an extra tag

Environment

  • Angular: 17.1.0
  • CDK/Material: NO
  • Browser(s): Edge 120.0.2210.144
  • Operating System: Windows 11 Pro

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions