diff --git a/config/install/jw_player.settings.yml b/config/install/jw_player.settings.yml
new file mode 100644
index 0000000..4dc13c5
--- /dev/null
+++ b/config/install/jw_player.settings.yml
@@ -0,0 +1,3 @@
+jw_player_key: null
+jw_player_key_7: null
+jw_player_version: 6
\ No newline at end of file
diff --git a/config/jw_player.settings.yml b/config/jw_player.settings.yml
deleted file mode 100644
index b6b27da..0000000
--- a/config/jw_player.settings.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-jw_player_inline_js: false
-jw_player_key: null
diff --git a/config/schema/jw_player.schema.yml b/config/schema/jw_player.schema.yml
index 3afef0a..e7c9faa 100644
--- a/config/schema/jw_player.schema.yml
+++ b/config/schema/jw_player.schema.yml
@@ -55,11 +55,17 @@ field.formatter.settings.jwplayer_formatter:
       label: 'Select preset'
 
 jw_player.settings:
-    type: config_object
-    mapping:
-      account_token:
-        type: string
-        label: 'Cloud-Hosted Account Token'
-      license_key:
-        type: string
-        label: 'Self-Hosted Player License Key'
+  type: config_object
+  mapping:
+    jw_player_cloud_player_default:
+      type: string
+      label: 'Cloud-Hosted Account Token'
+    jw_player_key:
+      type: string
+      label: 'Self-Hosted Player License Key'
+    jw_player_key_7:
+      type: string
+      label: 'Self-Hosted Player 7 License Key'
+    jw_player_version:
+      type: integer
+      label: 'Jw player version'
diff --git a/jw_player.install b/jw_player.install
index d9df4a8..37e1f49 100755
--- a/jw_player.install
+++ b/jw_player.install
@@ -13,7 +13,7 @@ function jw_player_requirements($phase) {
     $directory = libraries_get_path('jwplayer');
   };
 
-  // Check the exisence of the JW Player Library.
+  // Check the existence of the JW Player Library.
   if ($phase == 'runtime') {
     $errors = array();
 
@@ -32,3 +32,16 @@ function jw_player_requirements($phase) {
 
   return $requirements;
 }
+
+/**
+ * Initialize settings.
+ */
+function jw_player_update_8001() {
+  $config = \Drupal::configFactory()->getEditable('jw_player.settings');
+  if ($config->get('account_token')) {
+    drupal_set_message(t('JW Player has changed its way to run cloud hosted players. Please update your configuration at /admin/config/media/jw_player/settings if you are using a cloud hosted player.'));
+    $config->clear('account_token');
+  }
+  $config->set('jw_player_version', 6);
+  drupal_set_message(t('JW Player version has been set to 6.'));
+}
diff --git a/jw_player.module b/jw_player.module
index e1b988b..240c272 100755
--- a/jw_player.module
+++ b/jw_player.module
@@ -37,7 +37,7 @@ function jw_player_theme() {
  */
 function template_preprocess_jw_player(&$variables) {
   $config = \Drupal::config('jw_player.settings');
-  if ($key = $config->get('license_key')) {
+  if ($key = jw_player_get_key()) {
     $variables['license_key'] = json_encode($key);
   }
   // Load defaults as the starting point.
@@ -69,33 +69,45 @@ function template_preprocess_jw_player(&$variables) {
   // Create a configuration array which will be passed to JWPlayer's JavaScript.
   $variables['config']['file'] = $variables['file_url'];
 
-  // Resolve skin url.
-  $skin = !empty($variables['skin']) ? jw_player_skins($variables['skin']) : '';
-  $variables['skin'] = !empty($skin) ? file_create_url($skin->uri) : '';
-
-  // Copy player variables into their own array to be set as JavaScript
-  // configuration.
-  // @todo Bad smell here. Refactoring needed.
-  $player_variables = array(
-    'width',
-    'height',
-    'controlbar',
-    'playlist.position',
-    'playlist.size',
-    'skin',
-    'autoplay',
-    'base',
-    'advertising',
-  );
+  if (jw_player_use_legacy()) {
+    // Resolve skin url.
+    $skin = !empty($variables['skin']) ? jw_player_skins($variables['skin']) : '';
+    $variables['skin'] = !empty($skin) ? file_create_url($skin->uri) : '';
+  }
+
+  // Don't apply preset config in case of cloud hosted players.
+  if (!empty($config->get('jw_player_cloud_player_default'))) {
+    // Copy player variables into their own array to be set as JavaScript
+    // configuration.
+    // @todo Bad smell here. Refactoring needed.
+    $player_variables = array(
+      'width',
+      'height',
+      'controlbar',
+      'playlist.position',
+      'playlist.size',
+      'skin',
+      'autoplay',
+      'base',
+      'advertising',
+    );
 
-  foreach ($player_variables as $key) {
-    if (!empty($variables[$key])) {
-      $variables['config'][$key] = $variables[$key];
+    foreach ($player_variables as $key) {
+      if (!empty($variables[$key])) {
+        $variables['config'][$key] = $variables[$key];
+      }
     }
-  }
 
-  $variables['config']['primary'] = $variables['mode'];
+    $variables['config']['primary'] = $variables['mode'];
 
+    if (isset($variables['autoplay']) && $variables['autoplay']) {
+      $variables['config']['autoplay'] = TRUE;
+    }
+
+    if (isset($variables['controlbar']) && !$variables['controlbar']) {
+      unset($variables['config']['controlbar']);
+    }
+  }
   // Unset advertising if is not set.
   if (empty($variables['config']['advertising']['client'])) {
     unset($variables['config']['advertising']);
@@ -141,7 +153,7 @@ function jw_player_default_settings() {
       ),
     );
 
-    if ($config->get('account_token')) {
+    if ($config->get('jw_player_cloud_player_default')) {
       unset($defaults['base']);
     }
   }
@@ -197,11 +209,6 @@ function jw_player_libraries_info() {
       'name' => 'JW Player',
       'vendor url' => 'http://www.jwplayer.com/',
       'download url' => 'http://www.jwplayer.com/download',
-      'version arguments' => array(
-        'file' => 'jwplayer.js',
-        'pattern' => '/jwplayer.version="(.*?)"/',
-        'lines' => 1,
-      ),
       'files' => array(
         'js' => array(
           'jwplayer.js' => array(),
@@ -209,6 +216,19 @@ function jw_player_libraries_info() {
       ),
     ),
   );
+
+  // Parse version from JS file for older versions.
+  if (jw_player_use_legacy()) {
+    $libraries['jwplayer']['version arguments'] = array(
+      'file' => 'jwplayer.js',
+      'pattern' => '/jwplayer.version="(.*?)"/',
+      'lines' => 1,
+    );
+  }
+  else {
+    // Version of JWPlayer 7 and above can't be parsed the same way anymore.
+    $libraries['jwplayer']['version'] = 7;
+  }
   return $libraries;
 }
 
@@ -226,9 +246,9 @@ function jw_player_library_info_alter(&$libraries, $extension) {
   );
 
   $config = \Drupal::config('jw_player.settings');
-  if ($account_token = $config->get('account_token')) {
+  if ($cloud_hosted_default = $config->get('jw_player_cloud_player_default')) {
     // Cloud hosted player, use external JavaScript.
-    $libraries['jwplayer']['js']["//jwpsrv.com/library/{$account_token}.js"] = array(
+    $libraries['jwplayer']['js'][$cloud_hosted_default] = array(
       'type' => 'external',
     );
   }
@@ -266,3 +286,25 @@ function jw_player_library_info_alter(&$libraries, $extension) {
   }
   return $libraries;
 }
+
+/**
+ * Checks whether a legacy version is configured.
+ *
+ * @return bool
+ *   TRUE if any version older than 7 is used, FALSE otherwise.
+ */
+function jw_player_use_legacy() {
+  $config = \Drupal::config('jw_player.settings');
+  return $config->get('jw_player_version') < 7;
+}
+
+/**
+ * Gets the correct key for the corresponding JW Player version.
+ *
+ * @return string
+ *   The license key as entered in the UI.
+ */
+function jw_player_get_key() {
+  $config = \Drupal::config('jw_player.settings');
+  return jw_player_use_legacy() ? $config->get('jw_player_key') : $config->get('jw_player_key_7');
+}
\ No newline at end of file
diff --git a/src/Form/JwplayerPresetAdd.php b/src/Form/JwplayerPresetAdd.php
index 7d83fdd..ccbcfbb 100644
--- a/src/Form/JwplayerPresetAdd.php
+++ b/src/Form/JwplayerPresetAdd.php
@@ -94,17 +94,6 @@ class JwplayerPresetAdd extends EntityForm {
       '#weight' => 5,
     );
 
-    $form['settings']['mode'] = array(
-      '#type' => 'radios',
-      '#title' => t('Embed mode'),
-      '#description' => t('Select your primary embed mode. Choosing HTML5 primary means that modern browsers that also support flash will use the HTML5 player first where possible. While this is desirable, the Flash based player supports more features and is generally more reliable.'),
-      '#options' => array(
-        'flash' => t('Flash primary, HTML5 failover'),
-        'html5' => t('HTML5 primary, Flash failover'),
-      ),
-      '#default_value' => isset($preset->settings['mode']) ? $preset->settings['mode'] : 'html5',
-    );
-
     $form['settings']['width'] = array(
       '#type' => 'textfield',
       '#size' => 10,
@@ -141,19 +130,33 @@ class JwplayerPresetAdd extends EntityForm {
       '#weight' => 7,
     );
 
-    // Skins.
-    $skin_options = array();
-    foreach (jw_player_skins() as $skin) {
-      $skin_options[$skin->name] = Unicode::ucfirst($skin->name);
-    }
+    // Some settings are suitable for legacy versions only.
+    if (jw_player_use_legacy()) {
+      $form['settings']['mode'] = array(
+        '#type' => 'radios',
+        '#title' => t('Embed mode'),
+        '#description' => t('Select your primary embed mode. Choosing HTML5 primary means that modern browsers that also support flash will use the HTML5 player first where possible. While this is desirable, the Flash based player supports more features and is generally more reliable.'),
+        '#options' => array(
+          'flash' => t('Flash primary, HTML5 failover'),
+          'html5' => t('HTML5 primary, Flash failover'),
+        ),
+        '#default_value' => isset($preset->settings['mode']) ? $preset->settings['mode'] : 'html5',
+      );
 
-    $form['settings']['skin'] = array(
-      '#title' => t('Skin'),
-      '#type' => 'select',
-      '#default_value' => !empty($preset->settings['skin']) ? $preset->settings['skin'] : FALSE,
-      '#empty_option' => t('None (default skin)'),
-      '#options' => $skin_options,
-    );
+      // Skins.
+      $skin_options = array();
+      foreach (jw_player_skins() as $skin) {
+        $skin_options[$skin->name] = Unicode::ucfirst($skin->name);
+      }
+
+      $form['settings']['skin'] = array(
+        '#title' => t('Skin'),
+        '#type' => 'select',
+        '#default_value' => !empty($preset->settings['skin']) ? $preset->settings['skin'] : FALSE,
+        '#empty_option' => t('None (default skin)'),
+        '#options' => $skin_options,
+      );
+    }
 
     // Add preset plugin settings.
     foreach (jw_player_preset_plugins() as $plugin => $info) {
@@ -214,7 +217,7 @@ class JwplayerPresetAdd extends EntityForm {
       '#type' => 'details',
       '#title' => $this->t('Advertising'),
       '#description' => $this->t('This requires an enterprise license. See the <a href="@jwplayer_documentation_url">JW Player documentation</a> about preroll ads for more information'),
-      '#weight' => 5,
+      '#weight' => 8,
     );
 
     $form['settings']['advertising']['client'] = array(
diff --git a/src/Form/JwplayerSettingsForm.php b/src/Form/JwplayerSettingsForm.php
index f3526e1..51da0f5 100644
--- a/src/Form/JwplayerSettingsForm.php
+++ b/src/Form/JwplayerSettingsForm.php
@@ -39,23 +39,53 @@ class JwplayerSettingsForm extends ConfigFormBase {
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
     $config = $this->config('jw_player.settings');
-    $url = 'https://account.jwplayer.com/#/account';
-    $form['account_token'] = array(
+    $versions = [5 => 5, 6 => 6, 7 => 7];
+    $url = 'https://dashboard.jwplayer.com/#/players/downloads';
+
+    $form['jw_player_version'] = array(
+      '#type' => 'select',
+      '#title' => t('Player version'),
+      '#options' => $versions,
+      '#default_value' => $config->get('jw_player_version'),
+      '#description' => t('Select the version of JWPlayer you are using.'),
+    );
+
+    $form['jw_player_key'] = array(
+      '#type' => 'textfield',
+      '#title' => $this->t('Self-Hosted Player License Key (version 6.x)'),
+      '#description' => $this->t('Enter your key here. You can retrieve your license key from <a href="@url" target="_blank">your downloads page at jwplayer.com</a>.', array(
+        '@url' => $url,
+      )),
+      '#default_value' => $config->get('jw_player_key'),
+      '#states' => array(
+        'visible' => array(
+          array('select[name="jw_player_version"]' => array('value' => '5')),
+          array('select[name="jw_player_version"]' => array('value' => '6')),
+        ),
+      ),
+    );
+
+    $form['jw_player_key_7'] = array(
       '#type' => 'textfield',
-      '#title' => $this->t('Cloud-Hosted Account Token'),
-      '#description' => $this->t('Set the account token for a Cloud-Hosted Player, or leave empty if using a Self-Hosted Player. You can retrieve your token from <a href="@url">your account settings page at jwplayer.com</a>.', array(
+      '#title' => $this->t('Self-Hosted Player License Key (version 7.x)'),
+      '#description' => $this->t('Enter your key here. You can retrieve your license key from <a href="@url" target="_blank">your downloads page at jwplayer.com</a>.', array(
         '@url' => $url,
       )),
-      '#default_value' => $config->get('account_token', NULL),
+      '#default_value' => $config->get('jw_player_key_7'),
+      '#states' => array(
+        'visible' => array(
+          'select[name="jw_player_version"]' => array('value' => '7'),
+        ),
+      ),
     );
 
-    $form['license_key'] = array(
+    $form['jw_player_cloud_player_default'] = array(
       '#type' => 'textfield',
-      '#title' => $this->t('Self-Hosted Player License Key'),
-      '#description' => $this->t('If you have a premium account enter your key here. You can retrieve your license key from <a href="@url">your account settings page at jwplayer.com</a>.', array(
+      '#title' => $this->t('Url of the Default Cloud-Hosted Player'),
+      '#description' => $this->t('You can get the url for your cloud hosted player at <a href="@url" target="_blank">your downloads page at jwplayer.com</a>. After choosing your player, simply copy and enter the whole url from the field "Cloud Player Library Url" here. If you are using the cloud hosted player, the self hosted files will not be loaded.', array(
         '@url' => $url,
       )),
-      '#default_value' => $config->get('license_key', NULL),
+      '#default_value' => $config->get('jw_player_cloud_player_default'),
     );
 
     return parent::buildForm($form, $form_state);
@@ -66,8 +96,10 @@ class JwplayerSettingsForm extends ConfigFormBase {
   public function submitForm(array &$form, FormStateInterface $form_state) {
     parent::submitForm($form, $form_state);
     $config = $this->config('jw_player.settings');
-    $config->set('account_token', $form_state->getValue('account_token'));
-    $config->set('license_key', $form_state->getValue('license_key'));
+    $config->set('jw_player_version', $form_state->getValue('jw_player_version'));
+    $config->set('jw_player_cloud_player_default', $form_state->getValue('jw_player_cloud_player_default'));
+    $config->set('jw_player_key', $form_state->getValue('jw_player_key'));
+    $config->set('jw_player_key_7', $form_state->getValue('jw_player_key_7'));
     $config->save();
   }
 
diff --git a/src/Tests/JwPlayerConfigurationTest.php b/src/Tests/JwPlayer7ConfigurationTest.php
similarity index 78%
copy from src/Tests/JwPlayerConfigurationTest.php
copy to src/Tests/JwPlayer7ConfigurationTest.php
index c5691da..96bddd7 100644
--- a/src/Tests/JwPlayerConfigurationTest.php
+++ b/src/Tests/JwPlayer7ConfigurationTest.php
@@ -1,7 +1,7 @@
 <?php
 /**
  * @file
- * Contains \Drupal\jw_player\JwPlayerConfigurationTest.
+ * Contains \Drupal\jw_player\JwPlayer7ConfigurationTest.
  */
 
 namespace Drupal\jw_player\Tests;
@@ -11,11 +11,11 @@ use Drupal\field_ui\Tests\FieldUiTestTrait;
 use Drupal\simpletest\WebTestBase;
 
 /**
- * Tests configuration of a jw player preset and creation of jw player content.
+ * Tests configuration of a jw player 7 preset and creation of jw player content.
  *
  * @group jw_player
  */
-class JwPlayerConfigurationTest extends WebTestBase {
+class JwPlayer7ConfigurationTest extends WebTestBase {
 
   use FieldUiTestTrait;
 
@@ -63,13 +63,16 @@ class JwPlayerConfigurationTest extends WebTestBase {
     $this->drupalLogin($admin_user);
 
     // Add a random "Cloud-Hosted Account Token".
-    $this->drupalPostForm('admin/config/media/jw_player/settings', array('account_token' => $token = $this->randomMachineName(8)), t('Save configuration'));
+    $edit = [
+      'jw_player_cloud_player_default' => $token = 'https://content.jwplatform.com/libraries/' . $this->randomMachineName(8) . '.js',
+      'jw_player_version' => 7,
+    ];
+    $this->drupalPostForm('admin/config/media/jw_player/settings', $edit, t('Save configuration'));
     // Create a jw player preset.
     $edit = array(
       'label' => 'Test preset',
       'id' => 'test_preset',
       'description' => 'Test preset description',
-      'settings[mode]' => 'html5',
       'settings[width]' => 100,
       'settings[height]' => 100,
       'settings[advertising][client]' => 'vast',
@@ -82,7 +85,7 @@ class JwPlayerConfigurationTest extends WebTestBase {
     $this->drupalGet('admin/config/media/jw_player/test_preset');
     $this->assertFieldByName('label', 'Test preset');
     $this->assertFieldByName('description', 'Test preset description');
-    $this->assertFieldByName('settings[mode]', 'html5');
+    $this->assertNoField('settings[mode]');
     $this->assertFieldByName('settings[advertising][client]', 'vast');
     $this->assertFieldByName('settings[advertising][tag]', 'www.example.com/vast');
     $this->assertFieldByName('settings[controlbar]', 'bottom');
@@ -120,30 +123,7 @@ class JwPlayerConfigurationTest extends WebTestBase {
     // Make sure the hash is there.
     $this->assertTrue(preg_match('/jwplayer-[a-zA-Z0-9]{1,}$/', $id));
     // Check the library created because of cloud hosting.
-    $this->assertRaw('<script src="//jwpsrv.com/library/' . $token . '.js"></script>');
-  }
-
-  /**
-   * Tests the UI for deletion of a preset.
-   */
-  public function testDelete() {
-    $admin_user = $this->drupalCreateUser(array(
-      'administer site configuration',
-    ));
-    $this->drupalLogin($admin_user);
-
-    // Create a preset.
-    $this->drupalPostForm('admin/config/media/jw_player/add', [
-      'label' => 'Test preset',
-      'id' => 'test_preset',
-      'settings[width]' => 100,
-      'settings[height]' => 100,
-    ], t('Save'));
-
-    $this->clickLink(t('Delete'));
-    $this->drupalPostForm(NULL, [], t('Delete'));
-    $this->assertRaw(t('The @entity-type %label has been deleted.', ['@entity-type' => 'jw player preset', '%label' => 'Test preset']));
-    $this->assertEqual([], $this->xpath('//td[text()=@label]', ['@label' => 'Test preset']));
+    $this->assertRaw('<script src="' . $token . '"></script>');
   }
 
 }
diff --git a/src/Tests/JwPlayerConfigurationTest.php b/src/Tests/JwPlayerConfigurationTest.php
index c5691da..7468bcd 100644
--- a/src/Tests/JwPlayerConfigurationTest.php
+++ b/src/Tests/JwPlayerConfigurationTest.php
@@ -63,7 +63,10 @@ class JwPlayerConfigurationTest extends WebTestBase {
     $this->drupalLogin($admin_user);
 
     // Add a random "Cloud-Hosted Account Token".
-    $this->drupalPostForm('admin/config/media/jw_player/settings', array('account_token' => $token = $this->randomMachineName(8)), t('Save configuration'));
+    $edit = [
+      'jw_player_cloud_player_default' => $token = 'https://content.jwplatform.com/libraries/' . $this->randomMachineName(8) . '.js',
+    ];
+    $this->drupalPostForm('admin/config/media/jw_player/settings', $edit, t('Save configuration'));
     // Create a jw player preset.
     $edit = array(
       'label' => 'Test preset',
@@ -120,7 +123,7 @@ class JwPlayerConfigurationTest extends WebTestBase {
     // Make sure the hash is there.
     $this->assertTrue(preg_match('/jwplayer-[a-zA-Z0-9]{1,}$/', $id));
     // Check the library created because of cloud hosting.
-    $this->assertRaw('<script src="//jwpsrv.com/library/' . $token . '.js"></script>');
+    $this->assertRaw('<script src="' . $token . '"></script>');
   }
 
   /**
