#影片及音檔下載過程極慢所以建議少用
VideoSendMessage
video_message = VideoSendMessage(
original_content_url='https://example.com/original.mp4'必須是能夠下載的影片,
preview_image_url='https://example.com/preview.jpg'影片下載前的預覽圖
)
type
String Required
影片跟圖像很像但必須適用mp4且大小不能超過200MB
video
originalContentUrl
String Required
URL of video file (Max character limit: 2000)
HTTPS over TLS 1.2 or later
mp4
Max file size: 200 MB
URL碼
預覽圖用於載入成功前看的
previewImageUrl
String Required
URL of preview image (Max character limit: 2000)
HTTPS over TLS 1.2 or later
JPEG or PNG
Max file size: 1 MB
用於影片看完後可以進行一些動作,但我在LINE官網沒找到示範所以這裡就先沒了,未來找到再補上
trackingId
String Optional
ID used to identify the video when Video viewing complete event occurs. If you send a video message with trackingId added, the video viewing complete event occurs when the user finishes watching the video.
You can use the same ID in multiple messages.
Max character limit: 100
Supported character types: Half-width alphanumeric characters (a-z, A-Z, 0-9) and symbols (-.=,+*()%$&;:@{}!?<>[])
AudioSendMessage
audio_message = AudioSendMessage(
original_content_url='https://example.com/original.m4a',
duration=240000
)
Audio message
type
String Required
audio
與影片類似但只能用m4a檔
originalContentUrl
String Required
URL of audio file (Max character limit: 2000)
HTTPS over TLS 1.2 or later
m4a
Max file size: 200 MB
音檔執行秒數
duration
Number Required
Length of audio file (milliseconds)