ThaiSEOBoard.com

พัฒนาเว็บไซต์ => Programming => ข้อความที่เริ่มโดย: steelseries ที่ 23 พฤษภาคม 2019, 14:19:26



หัวข้อ: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: steelseries ที่ 23 พฤษภาคม 2019, 14:19:26
เพื่อนๆเอาไปปรับใช้กันดูครับไปเจอมาเป็น API ทำงานตรงๆกับ googleapis เลย ผมลองแล้วใช้ได้แน่นอน
โค๊ด:
<!DOCTYPE html>
<html lang="en">
  <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>GoogleAPI</title>

    <!-- Styles -->

    <!-- Favicons -->
<link rel="shortcut icon" href="https://images.vexels.com/media/users/3/137425/isolated/preview/f2ea1ded4d037633f687ee389a571086-logotipo-de-youtube-icono-by-vexels.png" type="image/x-icon" />

<!-- Core Funcs -->
  <script src='[url]https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'[/url]></script>
  <script src="https://ssl.p.jwpcdn.com/player/v/8.6.2/jwplayer.js"></script>
<!-- END Core Funcs -->
<style>
* {
    margin: 0px;
}
html {
    overflow: hidden;
}
</style>    
  </head>

<body>
<div id="encrpyt">

</div>
<!-- Core Streaming -->
<script>
jwplayer.key = "cLGMn8T20tGvW 0eXPhq4NNmLB57TrscPjd1IyJF84o=";

var player = jwplayer('encrpyt');

player.setup({
  sources: [ {
file: "https://www.googleapis.com/drive/v3/files/<?=$_GET['id']?>?alt=media&key=AIzaSyBFHimHWDyLOtcNJjA268KwRLhsBuckUxc", label: "240p",
type: "video/mp4"
},{
file: "https://www.googleapis.com/drive/v3/files/<?=$_GET['id']?>?alt=media&key=AIzaSyBFHimHWDyLOtcNJjA268KwRLhsBuckUxc", label: "360p",
type: "video/mp4"
},{
file: "https://www.googleapis.com/drive/v3/files/<?=$_GET['id']?>?alt=media&key=AIzaSyBFHimHWDyLOtcNJjA268KwRLhsBuckUxc", label: "720p",
type: "video/mp4"
},{
file: "https://www.googleapis.com/drive/v3/files/<?=$_GET['id']?>?alt=media&key=AIzaSyBFHimHWDyLOtcNJjA268KwRLhsBuckUxc", label: "1080p",
type: "video/mp4"
}
  ],
  autostart: false,     
  playbackRateControls: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 2],   
  abouttext: "Steelseries",
    aboutlink: "",         
 
  width: $(window).width(),
      height: $(window).height()          
});

$(document).ready(function() {
$(window).resize(function(){
jwplayer().resize($(window).width(),$(window).height())
})
})

</script>
<!-- END Core Streaming -->
</body>
</html>

วิธีเรียกใช้แบบง่ายๆ เพิ่ม ?id=ไอดีไฟล์ ไว้ข้างหลัง URL
ตัวอย่างลิงค์ที่ได้ example.com/gdrive/?id=1WvwqKvYvRwAe6SFTN4amFshayhOidX88
ลองเอาไปเขียนเป็นระบบที่เขาทำๆกันดู


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: binnazdd ที่ 23 พฤษภาคม 2019, 21:37:23
ขอบคณครับ  :wanwan017:


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: tarrekup ที่ 23 พฤษภาคม 2019, 21:44:45
ขอบคุณครับ  :wanwan013:


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: iammee ที่ 23 พฤษภาคม 2019, 22:09:16
Gdrive จับลิมิต view บินทั้ง user หรือเปล่า


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: iammee ที่ 23 พฤษภาคม 2019, 22:24:16
ดึงตรงๆ แบบนี้ก็เกินลิมิตอยู่ดี


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: Twenty-One ที่ 24 พฤษภาคม 2019, 09:06:08
ขอบคุณครับ

 :wanwan017:


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: sys2528 ที่ 24 พฤษภาคม 2019, 09:08:42
ขอบคุณมากครับ เก็บก่อนครับ  :wanwan017:


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: virussman ที่ 24 พฤษภาคม 2019, 09:23:39
ขอบคุณครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: Oii ที่ 24 พฤษภาคม 2019, 09:28:38
ดึงแบบนี้มัน error บ่อยมากเลยครับ ผมลองแล้ว  :P


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: minigoood ที่ 24 พฤษภาคม 2019, 09:36:03
ดึงแบบนี้มัน error บ่อยมากเลยครับ ผมลองแล้ว  :P
eror เพราะเป็นการดึงไฟล์ตรงๆ เว็ปเล็กๆ ใช้งานได้ แต่ถ้าเว็ปเริ่มมีคนเข้ามาดูเยอะๆ รับลองว่าบัญชีนั่นเกินลิมิต สุดท้ายก็ Error ทั้งบัญชี เพราะมันเป็นการดึงไฟล์มาดูตรงๆ ถ้าเมื่อก่อนตอน Gdrive ไม่กำจัดแบนวิช ใช้ได้สบายๆ แต่ตอนนี้จบ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: thaigopher ที่ 24 พฤษภาคม 2019, 10:20:14
ขอบคุณครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: yukkzu ที่ 24 พฤษภาคม 2019, 14:07:14
ลิมิตง่ายมากครับคนดูเยอะ
เดียวนี้ยังอัพในที่ฝากรูปgoogleได้อยู่ไหม


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: minigoood ที่ 24 พฤษภาคม 2019, 14:31:45
ลิมิตง่ายมากครับคนดูเยอะ
เดียวนี้ยังอัพในที่ฝากรูปgoogleได้อยู่ไหม
ได้ครับ แต่ไฟล์ไปกว่าไดฟ์


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: ppttonline ที่ 24 พฤษภาคม 2019, 14:44:58
ขอบคุณครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: tenzamak ที่ 24 พฤษภาคม 2019, 18:20:13
ขอบคุณครับ เดี๋ยวเอาไปลองใช้กับบทความความ เวบเล็กๆดู


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: airproacc ที่ 05 กุมภาพันธ์ 2020, 16:09:45
ใช้ยังไงน้อ ทำไม่เป็น อิอิ :-X


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: thanoo001 ที่ 05 กุมภาพันธ์ 2020, 16:14:26
เพื่อนๆเอาไปปรับใช้กันดูครับไปเจอมาเป็น API ทำงานตรงๆกับ googleapis เลย ผมลองแล้วใช้ได้แน่นอน
โค๊ด:
<!DOCTYPE html>
<html lang="en">
  <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>GoogleAPI</title>

    <!-- Styles -->

    <!-- Favicons -->
<link rel="shortcut icon" href="https://images.vexels.com/media/users/3/137425/isolated/preview/f2ea1ded4d037633f687ee389a571086-logotipo-de-youtube-icono-by-vexels.png" type="image/x-icon" />

<!-- Core Funcs -->
  <script src='[url]https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'[/url]></script>
  <script src="https://ssl.p.jwpcdn.com/player/v/8.6.2/jwplayer.js"></script>
<!-- END Core Funcs -->
<style>
* {
    margin: 0px;
}
html {
    overflow: hidden;
}
</style>    
  </head>

<body>
<div id="encrpyt">

</div>
<!-- Core Streaming -->
<script>
jwplayer.key = "cLGMn8T20tGvW 0eXPhq4NNmLB57TrscPjd1IyJF84o=";

var player = jwplayer('encrpyt');

player.setup({
  sources: [ {
file: "https://www.googleapis.com/drive/v3/files/<?=$_GET['id']?>?alt=media&key=AIzaSyBFHimHWDyLOtcNJjA268KwRLhsBuckUxc", label: "240p",
type: "video/mp4"
},{
file: "https://www.googleapis.com/drive/v3/files/<?=$_GET['id']?>?alt=media&key=AIzaSyBFHimHWDyLOtcNJjA268KwRLhsBuckUxc", label: "360p",
type: "video/mp4"
},{
file: "https://www.googleapis.com/drive/v3/files/<?=$_GET['id']?>?alt=media&key=AIzaSyBFHimHWDyLOtcNJjA268KwRLhsBuckUxc", label: "720p",
type: "video/mp4"
},{
file: "https://www.googleapis.com/drive/v3/files/<?=$_GET['id']?>?alt=media&key=AIzaSyBFHimHWDyLOtcNJjA268KwRLhsBuckUxc", label: "1080p",
type: "video/mp4"
}
  ],
  autostart: false,     
  playbackRateControls: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 2],   
  abouttext: "Steelseries",
    aboutlink: "",         
 
  width: $(window).width(),
      height: $(window).height()          
});

$(document).ready(function() {
$(window).resize(function(){
jwplayer().resize($(window).width(),$(window).height())
})
})

</script>
<!-- END Core Streaming -->
</body>
</html>

วิธีเรียกใช้แบบง่ายๆ เพิ่ม ?id=ไอดีไฟล์ ไว้ข้างหลัง URL
ตัวอย่างลิงค์ที่ได้ example.com/gdrive/?id=1WvwqKvYvRwAe6SFTN4amFshayhOidX88
ลองเอาไปเขียนเป็นระบบที่เขาทำๆกันดู
การใช้ Parameter alt=media ใน Google Drive API V3 มันดึงเป็นไฟล์ดาวน์โหลดนิครับ แล้วระบบจะปรับความระเอียดยังไง เมื่อไฟล์ดาวน์โหลดมีไฟล์เดียว


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: boom51120 ที่ 29 พฤษภาคม 2020, 08:47:11
 :wanwan004: ขอบคุณครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: Pagesrirung ที่ 30 พฤษภาคม 2020, 12:52:42
ขอบคุณครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: m037com ที่ 23 มิถุนายน 2020, 17:33:18
ขอบคุณครับ  :wanwan017: :wanwan017:


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: PPKS ที่ 23 มิถุนายน 2020, 18:14:35
ขอบคุณครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: namkangb ที่ 23 มิถุนายน 2020, 22:30:23
ขอบคุณค่ะ  :wanwan017:


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: mobsiw ที่ 24 มิถุนายน 2020, 06:57:55
ขอบคุณมากครับ  :wanwan017:


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: mutu_888 ที่ 09 กรกฎาคม 2020, 18:14:23
ขอบคุณมากครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: OhLaLaNa ที่ 10 กรกฎาคม 2020, 01:34:11
ขอบคุณมากๆครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: 7one011 ที่ 15 กรกฎาคม 2020, 21:55:52
ขอบคุณครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: AKA GUNDUM ที่ 16 กรกฎาคม 2020, 11:53:13
ขอบคุณครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: seohomepro ที่ 27 สิงหาคม 2020, 11:51:32
ขอบคุณคร้าบ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: champooko1 ที่ 27 สิงหาคม 2020, 13:39:15
แวะมาเก็บข้อมูลครับ


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: ZethX ที่ 27 สิงหาคม 2020, 15:52:51
ขอลองเอาไปศึกษาหน่อยครับ  :wanwan017:


หัวข้อ: Re: Google Drive to JWPlayer (แจกฟรี)
เริ่มหัวข้อโดย: Justin10 ที่ 27 สิงหาคม 2020, 19:20:45
ขอบคุณครับ อยากได้พอดี