<commit_before>package com.karasiq.videojs

import org.scalajs.dom.Element
import org.scalajs.dom.raw.TimeRanges

import scala.scalajs.js
import scala.scalajs.js.annotation.{JSGlobal, JSName}
import scala.scalajs.js.|

//noinspection AccessorLikeMethodIsEmptyParen
// TODO: Documentation
@js.native
@JSGlobal("videojs")
object VideoJS extends Component {

  /** Doubles as the main function for users to create a player instance and also the main library object. The videojs
    * function can be used to initialize or retrieve a player.
    * @param element
    *   Video element or video element ID
    * @param settings
    *   Optional options object for config/settings
    * @param ready
    *   Optional ready callback
    */
  def apply(element: String | Element, settings: js.Object = ???, ready: js.Function = ???): js.Object =
    js.native

  def addClass(element: Element, classToAdd: String): Unit =
    js.native

  /** Adding languages so that they're available to all players.
    * @param code
    *   The language code or dictionary property
    * @param data
    *   The data values to be translated
    * @example
    *   {{{ VideoJS.addLanguage("es", js.Dynamic.literal(Hello = "Hola")) }}}
    */
  def addLanguage(code: String, data: js.Object): Unit =<commit_msg>Use JSImport with fallback<commit_after>package com.karasiq.videojs

import org.scalajs.dom.Element
import org.scalajs.dom.raw.TimeRanges

import scala.scalajs.js
import scala.scalajs.js.annotation.{JSImport, JSName}
import scala.scalajs.js.|

//noinspection AccessorLikeMethodIsEmptyParen
// TODO: Documentation
@js.native
@JSImport("video.js", JSImport.Default, "videojs")
object VideoJS extends Component {

  /** Doubles as the main function for users to create a player instance and also the main library object. The videojs
    * function can be used to initialize or retrieve a player.
    * @param element
    *   Video element or video element ID
    * @param settings
    *   Optional options object for config/settings
    * @param ready
    *   Optional ready callback
    */
  def apply(element: String | Element, settings: js.Object = ???, ready: js.Function = ???): js.Object =
    js.native

  def addClass(element: Element, classToAdd: String): Unit =
    js.native

  /** Adding languages so that they're available to all players.
    * @param code
    *   The language code or dictionary property
    * @param data
    *   The data values to be translated
    * @example
    *   {{{VideoJS.addLanguage("es", js.Dynamic.literal(Hello = "Hola"))}}}
    */
  def addLanguage(code: String, data: js.Object): Unit =
{'fraction_non_alphanumeric': 0.10087886893389378, 'fraction_numerical': 0.0, 'mean_word_length': 3.467576791808874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6980023', 'n_tokens_mistral': 779, 'n_tokens_neox': 766, 'n_words': 255}