본문 바로가기
Java Script/JS basic

JS] 오디오 함수

by CodeMia 2021. 8. 27.

자주 쓰는 문형 


 

 

 

<audio> 태그 안에서 일어나는 일 

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio

 

What this line of code will do behind the scenes is 

it will actually construct an HTMLAudioElement

https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement

 

This HTMLMediaElement that we create has a whole bunch of properties and methods

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement

여기에서 play( ) 메소드를 찾을 수 있다. 

 

 


audio 문형이 constructor function 과 비슷하다.

 

 

audio
constructor function에 object 입력, object 메소드 호출

 

audio 문형을 풀어서 constructor function 으로 이렇게 바꿔 볼 수 있다.

 

 

 

 

 

 

 

 

 

댓글