Class VideoItem

VideoItem

동영상을 표시하는 레이아웃 항목입니다. 항목은 Form에서 액세스하거나 만들 수 있습니다.

// Open a form by ID and add three new video items, using a long URL,
// a short URL, and a video ID.
var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
form.addVideoItem()
    .setTitle('Video Title')
    .setHelpText('Video Caption')
    .setVideoUrl('www.youtube.com/watch?v=1234abcdxyz');

form.addVideoItem()
    .setTitle('Video Title')
    .setHelpText('Video Caption')
    .setVideoUrl('youtu.be/1234abcdxyz');

form.addVideoItem()
    .setTitle('Video Title')
    .setHelpText('Video Caption')
    .setVideoUrl('1234abcdxyz');

방법

메서드반환 유형간략한 설명
duplicate()VideoItem이 항목의 사본을 만들어 양식 끝에 추가합니다.
getAlignment()Alignment동영상의 가로 정렬을 가져옵니다.
getHelpText()String항목의 도움말 텍스트 (ImageItems, PageBreakItems, SectionHeaderItems와 같은 레이아웃 항목의 설명 텍스트라고도 함)를 가져옵니다.
getId()Integer항목의 고유 식별자를 가져옵니다.
getIndex()Integer양식의 모든 항목 중에서 항목의 색인을 가져옵니다.
getTitle()String항목의 제목을 가져옵니다 (SectionHeaderItem의 경우 헤더 텍스트라고도 함).
getType()ItemTypeItemType로 표시되는 항목의 유형을 가져옵니다.
getWidth()Integer동영상의 너비를 픽셀 단위로 가져옵니다.
setAlignment(alignment)VideoItem동영상의 가로 정렬을 설정합니다.
setHelpText(text)VideoItem항목의 도움말 텍스트 (ImageItems, PageBreakItems, SectionHeaderItems와 같은 레이아웃 항목의 설명 텍스트라고도 함)를 설정합니다.
setTitle(title)VideoItem항목의 제목을 설정합니다 (SectionHeaderItem의 경우 헤더 텍스트라고도 함).
setVideoUrl(youtubeUrl)VideoItem지정된 YouTube URL 또는 YouTube 동영상 ID에서 동영상 자체를 설정합니다.
setWidth(width)VideoItem동영상의 너비를 픽셀 단위로 설정합니다.

자세한 문서

duplicate()

이 항목의 사본을 만들어 양식 끝에 추가합니다.

리턴

VideoItem: 연결을 위해 이 VideoItem의 복제본입니다.

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getAlignment()

동영상의 가로 정렬을 가져옵니다.

리턴

Alignment: 가로 정렬

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getHelpText()

항목의 도움말 텍스트 (ImageItems, PageBreakItems, SectionHeaderItems와 같은 레이아웃 항목의 설명 텍스트라고도 함)를 가져옵니다.

리턴

String: 항목의 도움말 텍스트 또는 설명 텍스트

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getId()

항목의 고유 식별자를 가져옵니다.

리턴

Integer: 항목의 ID

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getIndex()

양식의 모든 항목 중에서 항목의 색인을 가져옵니다.

리턴

Integer: 항목의 색인

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getTitle()

항목의 제목을 가져옵니다 (SectionHeaderItem의 경우 헤더 텍스트라고도 함).

리턴

String: 항목의 제목 또는 헤더 텍스트

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getType()

ItemType로 표시되는 항목의 유형을 가져옵니다.

리턴

ItemType: 항목의 유형

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

getWidth()

동영상의 너비를 픽셀 단위로 가져옵니다.

리턴

Integer: 너비(픽셀)

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setAlignment(alignment)

동영상의 가로 정렬을 설정합니다.

매개변수

이름유형설명
alignmentAlignment가로 정렬

리턴

VideoItem: 이 VideoItem, 체이닝용

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setHelpText(text)

항목의 도움말 텍스트 (ImageItems, PageBreakItems, SectionHeaderItems와 같은 레이아웃 항목의 설명 텍스트라고도 함)를 설정합니다.

매개변수

이름유형설명
textString새 도움말 텍스트

리턴

VideoItem: 이 VideoItem, 체이닝용

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setTitle(title)

항목의 제목을 설정합니다 (SectionHeaderItem의 경우 헤더 텍스트라고도 함).

매개변수

이름유형설명
titleString새 제목 또는 헤더 텍스트

리턴

VideoItem: 이 VideoItem, 체이닝용

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setVideoUrl(youtubeUrl)

지정된 YouTube URL 또는 YouTube 동영상 ID에서 동영상 자체를 설정합니다.

매개변수

이름유형설명
youtubeUrlStringYouTube URL 또는 ID

리턴

VideoItem: 이 VideoItem, 체이닝용

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms

setWidth(width)

동영상의 너비를 픽셀 단위로 설정합니다. 동영상의 너비만 설정할 수 있습니다. 높이는 동영상의 비율을 유지하도록 자동으로 설정됩니다.

매개변수

이름유형설명
widthInteger너비(픽셀)

리턴

VideoItem: 이 VideoItem, 체이닝용

승인

이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.

  • https://www.googleapis.com/auth/forms.currentonly
  • https://www.googleapis.com/auth/forms