# Gsy Option Builder

用 GSYVideoOptionBuilder 一次性把播放器所有可调项配好；等价于对 StandardGSYVideoPlayer 挨个 setter 但更紧凑。

- Repository: https://github.com/CarGuo/GSYVideoPlayer (21524 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-10
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add CarGuo/GSYVideoPlayer --skill gsy-option-builder -g -a claude-code -y`
Codex: `npx skills add CarGuo/GSYVideoPlayer --skill gsy-option-builder -g -a codex -y`
Cursor: `npx skills add CarGuo/GSYVideoPlayer --skill gsy-option-builder -g -a cursor -y`
Gemini CLI: `npx skills add CarGuo/GSYVideoPlayer --skill gsy-option-builder -g -a gemini-cli -y`

## Description

用 GSYVideoOptionBuilder 一次性把播放器所有可调项配好；等价于对 StandardGSYVideoPlayer 挨个 setter 但更紧凑。

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# gsy-option-builder

## API 总览

入口：[GSYVideoOptionBuilder](../../gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/builder/GSYVideoOptionBuilder.java)。

链式调用，最后 `build(player)` 把状态灌到具体 `GSYBaseVideoPlayer`。

```java
new GSYVideoOptionBuilder()
    .setUrl(url)
    .setCacheWithPlay(true)
    .setVideoTitle(title)
    .setIsTouchWiget(true)
    .setRotateViewAuto(false)
    .setLockLand(false)
    .setLooping(false)
    .setSpeed(1.0f)
    .setSeekOnStart(0)
    .setVideoAllCallBack(callback)
    .build(player);
```

## 完整参数表（按 [源文件行号](../../gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/builder/GSYVideoOptionBuilder.java) 对齐）

The rest: https://github.com/CarGuo/GSYVideoPlayer/blob/HEAD/skills/02-gsy-option-builder/SKILL.md
