# US 2020/0396504 A1 · Method and Device for Playing Media File While Switching Resolution in Webpage and Storage Medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0396504 A1
- Document ID: US20200396504A1
- Status: Published application
- Kind: A1
- Application number: 17/002,439
- Filed: 2020-08-25
- Published: 2020-12-17
- Earliest claimed: 2018-05-29
- Assignees: Beijing Bytedance Network Technology Co., Ltd.
- Applicants: Beijing Bytedance Network Technology Co., Ltd.
- Inventors: Guohui YIN
- Web page: https://patentgrep.com/patent/US20200396504A1

## CPC

- H04N 21/440263: {by altering the spatial resolution, e.g. for displaying on a connected PDA}
- H04N 21/8456: {by decomposing the content in the time domain, e.g. in time segments}
- H04N 21/435: Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
- H04N 21/438: Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
- H04N 21/4402: involving reformatting operations of video signals for household redistribution, storage or real-time display {(details of conversion of video standards at pixel level H04N7/01; video transcoding H04N19/40; adapting incoming signals to the display format of the display terminal G09G5/005; media handling at the source in data packet switching networks H04L65/764)}
- H04N 21/4782: Web browsing {, e.g. WebTV}
- H04N 21/6587: Control parameters, e.g. trick play commands, viewpoint selection
- H04N 21/8173: {End-user applications, e.g. Web browser, game}
- H04N 21/84: Generation or processing of descriptive data, e.g. content descriptors {(systems specially adapted for using meta-information in broadcast systems H04H60/73)}
- H04N 21/85406: {involving a specific file format, e.g. MP4 format}
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

The disclosure relates to a method and a device for playing a media file while switching resolution in a webpage and a storage medium, the method includes: receiving a resolution switching event when the player embedded in the webpage plays the original resolution media file; requesting media data in the target resolution media file to be switched to in response to the resolution switching event; wherein the original resolution media file and the target resolution media file adopt a non-streaming media packaging format; constructing a fragmented media file for independent decoding on the basis of the requested media data; sending the fragmented media file to a media element of the webpage through a media source expansion interface of the webpage. The fragmented media file is used for playing the media element in succession with the playing point where the resolution switching event occurs.

## Claims

### Claim 1

A method for playing a media file while switching resolution in a webpage, comprising:
receiving a resolution switching event when a player embedded in the webpage plays a media file with original resolution;
requesting media data of a media file with target resolution to be switched in response to the resolution switching event;
wherein the media file with original resolution and the media file with target resolution adopt a non-streaming media packaging format;
constructing a fragmented media file for independently decoding based on the requested media data; and
sending the fragmented media file to a media element of the webpage through a media source expansion interface of the webpage; wherein the fragmented media file is used for providing the media element to play in succession with a playing point where the resolution switching event occurs.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the requesting media data of a media file with target resolution to be switched in response to the resolution switching event comprises:
determining two key frames in the media file with target resolution based on time of a video frame represented by media information of the media file with target resolution;
wherein decoding time of the two key frames is endpoint time of a given period, and the given period is used for continuing the playing point of the media file with original resolution;
requesting the media data in the media file with target resolution based on a location of the media data represented by the media information in the media file with target resolution; wherein the decoding time of the requested media data is within the given period.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the given period is shorter than or equal to a preloading period, and the preloading period is shorter than playing time of the media file with target resolution.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the constructing a fragmented media file for independently decoding based on the requested media data comprises:
calculating metadata corresponding to the media data; wherein the calculated metadata carry media information for supporting to decode the media data; and
filling the calculated metadata and media data between the two key frames into a packaging structure of the fragmented media file to acquire a corresponding fragmented media file.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the sending the fragmented media file to a media element of the webpage through a media source expansion interface of the webpage comprises:
adding the constructed fragmented media file to a media source object in the media source expansion interface;
creating a virtual address corresponding to the media source object; and
transmitting the virtual address to the media element of the webpage, wherein the virtual address is used for supporting the media element to play by taking the media source object as a data source.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the method further comprises:
when the resolution switching event is received, continuing playing based on a fragmented media file with original resolution until completing to construct the fragmented media file with target resolution that is sent to the media element of the webpage through the media source expansion interface.

### Claim 7 (depends on 2)

The method according to claim 2, wherein the method further comprises:
when the resolution switching event is received, continuing playing based on a fragmented media file with original resolution until completing to construct the fragmented media file with target resolution that is sent to the media element of the webpage through the media source expansion interface.

### Claim 8 (depends on 3)

The method according to claim 3, wherein the method further comprises:
when the resolution switching event is received, continuing playing based on a fragmented media file with original resolution until completing to construct the fragmented media file with target resolution that is sent to the media element of the webpage through the media source expansion interface.

### Claim 9 (depends on 4)

The method according to claim 4, wherein the method further comprises:
when the resolution switching event is received, continuing playing based on a fragmented media file with original resolution until completing to construct the fragmented media file with target resolution that is sent to the media element of the webpage through the media source expansion interface.

### Claim 10 (depends on 5)

The method according to claim 5, wherein the method further comprises:
when the resolution switching event is received, continuing playing based on a fragmented media file with original resolution until completing to construct the fragmented media file with target resolution that is sent to the media element of the webpage through the media source expansion interface.

### Claim 11

A device for playing a media file while switching resolution in a webpage, wherein the device comprises:
at least one processor; and
at least one memory communicatively coupled to the at least one processor and storing instructions that upon execution by the at least one processor cause the device to:
receive a resolution switching event when a player embedded in the webpage plays a media file with original resolution;
request media data of a media file with target resolution to be switched in response to the resolution switching event;
construct a fragmented media file for independently decoding based on the requested media data; and
send the fragmented media file to a media element of the webpage through a media source expansion interface of the webpage; wherein the fragmented media file is used for providing the media element to play in succession with a playing point where the resolution switching event occurs.

### Claim 12 (depends on 11)

The device according to claim 11, wherein the at least one memory further stores instructions that upon execution by the at least one processor cause the device system to determine two key frames in the media file with target resolution based on time of a video frame represented by media information of the media file with target resolution;
wherein decoding time of the two key frames is endpoint time of a given period, and the given period is used for continuing the playing point of the media file with original resolution;
wherein the at least one memory further stores instructions that upon execution by the at least one processor cause the device system to request the media data in the media file with target resolution based on a location of the media data represented by the media information in the media file with target resolution; wherein the decoding time of the requested media data is within the given period.

### Claim 13 (depends on 12)

The device according to claim 12, wherein the given period is shorter than or equal to a preloading period, and the preloading period is shorter than playing time of the media file with target resolution.

### Claim 14 (depends on 11)

The device according to claim 11, wherein the at least one memory further stores instructions that upon execution by the at least one processor cause the device system to calculate metadata corresponding to the media data; wherein the calculated metadata carry media information for supporting to decode the media data;
wherein the at least one memory further stores instructions that upon execution by the at least one processor cause the device system to fill the calculated metadata and the media data between the two key frames into a packaging structure of the fragmented media file to acquire a corresponding fragmented media file.

### Claim 15 (depends on 11)

The device according to claim 11, wherein the at least one memory further stores instructions that upon execution by the at least one processor cause the device system to add the constructed fragmented media file to a media source object in the media source expansion interface;
wherein the at least one memory further stores instructions that upon execution by the at least one processor cause the device system to create a virtual address corresponding to the media source object;
wherein the at least one memory further stores instructions that upon execution by the at least one processor cause the device system to transmit the virtual address to the media element of the webpage, wherein the virtual address is used for supporting the media element to play by taking the media source object as a data source.

### Claim 16 (depends on 11)

The device according to claim 11, wherein the device further comprises:
at least one memory further stores instructions that upon execution by the at least one processor cause the device system to continue playing based on a fragmented media file with original resolution when the resolution switching event is received, until the fragment construction module completes to construct the fragmented media file with target resolution that is sent to the media element of the webpage through the media source expansion interface.

### Claim 17 (depends on 12)

The device according to claim 12, wherein the device further comprises:
at least one memory further stores instructions that upon execution by the at least one processor cause the device system to continue playing based on a fragmented media file with original resolution when the resolution switching event is received, until the fragment construction module completes to construct the fragmented media file with target resolution that is sent to the media element of the webpage through the media source expansion interface.

### Claim 18 (depends on 13)

The device according to claim 13, wherein the device further comprises:
at least one memory further stores instructions that upon execution by the at least one processor cause the device system to continue playing based on a fragmented media file with original resolution when the resolution switching event is received, until the fragment construction module completes to construct the fragmented media file with target resolution that is sent to the media element of the webpage through the media source expansion interface.

### Claim 19 (depends on 14)

The device according to claim 14, wherein the device further comprises:
at least one memory further stores instructions that upon execution by the at least one processor cause the device system to continue playing based on a fragmented media file with original resolution when the resolution switching event is received, until the fragment construction module completes to construct the fragmented media file with target resolution that is sent to the media element of the webpage through the media source expansion interface.

### Claim 20

A storage medium, wherein an executable instruction is stored, and when the executable instruction is executed, the storage medium performing operations comprising:
receiving a resolution switching event when a player embedded in the webpage plays a media file with original resolution;
requesting media data of a media file with target resolution to be switched in response to the resolution switching event;
wherein the media file with original resolution and the media file with target resolution adopt a non-streaming media packaging format;
constructing a fragmented media file for independently decoding based on the requested media data; and
sending the fragmented media file to a media element of the webpage through a media source expansion interface of the webpage; wherein the fragmented media file is used for providing the media element to play in succession with a playing point where the resolution switching event occurs.
